Repetier-Firmware  1.0.0
pins.h
Go to the documentation of this file.
1 #ifndef PINS_H
2 #define PINS_H
3 
4 /*
5 The board assignment defines the capabilities of the motherboard and the used pins.
6 Each board definition follows the following scheme:
7 
8 CPU_ARCH
9  ARCH_AVR for AVR based boards
10  ARCH_ARM for all arm based boards
11 
12 STEPPER_CURRENT_CONTROL
13  CURRENT_CONTROL_MANUAL 1 // mechanical poti, default if not defined
14  CURRENT_CONTROL_DIGIPOT 2 // Use a digipot like RAMBO does
15  CURRENT_CONTROL_LTC2600 3 // Use LTC2600 like Foltyn 3D Master
16  CURRENT_CONTROL_ALLIGATOR 4 //Use External DAC like Alligator
17 */
18 
19 #define ARCH_AVR 1
20 #define ARCH_ARM 2
21 
22 #define CURRENT_CONTROL_MANUAL 1 // mechanical poti, default if not defined
23 #define CURRENT_CONTROL_DIGIPOT 2 // Use a digipot like RAMBO does
24 #define CURRENT_CONTROL_LTC2600 3 // Use LTC2600 like Foltyn 3D Master
25 #define CURRENT_CONTROL_ALLIGATOR 4 //Use External DAC like Alligator
26 #define CURRENT_CONTROL_MCP4728 5 // Use an i2c DAC as a digipot like PrintrBoard Rev. F
27 
28 /****************************************************************************************
29 * Arduino pin assignment
30 *
31 * ATMega168
32 * +-\/-+
33 * PC6 1| |28 PC5 (AI 5 / D19)
34 * (D 0) PD0 2| |27 PC4 (AI 4 / D18)
35 * (D 1) PD1 3| |26 PC3 (AI 3 / D17)
36 * (D 2) PD2 4| |25 PC2 (AI 2 / D16)
37 * PWM+ (D 3) PD3 5| |24 PC1 (AI 1 / D15)
38 * (D 4) PD4 6| |23 PC0 (AI 0 / D14)
39 * VCC 7| |22 GND
40 * GND 8| |21 AREF
41 * PB6 9| |20 AVCC
42 * PB7 10| |19 PB5 (D 13)
43 * PWM+ (D 5) PD5 11| |18 PB4 (D 12)
44 * PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
45 * (D 7) PD7 13| |16 PB2 (D 10) PWM
46 * (D 8) PB0 14| |15 PB1 (D 9) PWM
47 * +----+
48 ****************************************************************************************/
49 #if MOTHERBOARD == 0
50 #define KNOWN_BOARD 1
51 
52 #ifndef __AVR_ATmega168__
53 #error Oops! Make sure you have 'Arduino Diecimila' selected from the boards menu.
54 #endif
55 
56 #define ORIG_X_STEP_PIN 2
57 #define ORIG_X_DIR_PIN 3
58 #define ORIG_X_ENABLE_PIN -1
59 #define ORIG_X_MIN_PIN 4
60 #define ORIG_X_MAX_PIN 9
61 
62 #define ORIG_Y_STEP_PIN 10
63 #define ORIG_Y_DIR_PIN 7
64 #define ORIG_Y_ENABLE_PIN -1
65 #define ORIG_Y_MIN_PIN 8
66 #define ORIG_Y_MAX_PIN 13
67 
68 #define ORIG_Z_STEP_PIN 19
69 #define ORIG_Z_DIR_PIN 18
70 #define ORIG_Z_ENABLE_PIN 5
71 #define ORIG_Z_MIN_PIN 17
72 #define ORIG_Z_MAX_PIN 16
73 
74 #define ORIG_E0_STEP_PIN 11
75 #define ORIG_E0_DIR_PIN 12
76 #define ORIG_E0_ENABLE_PIN -1
77 
78 #define SDPOWER -1
79 #define SDSS -1
80 #define LED_PIN -1
81 #define ORIG_FAN_PIN -1
82 #define ORIG_PS_ON_PIN 15
83 
84 #define HEATER_0_PIN 6
85 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
86 #define TEMP_0_PIN 0
87 
88 
89 #endif
90 
91 
92 
93 /****************************************************************************************
94 * Sanguino/RepRap Motherboard with direct-drive extruders
95 *
96 * ATMega644P
97 *
98 * +---\/---+
99 * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
100 * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
101 * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
102 * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
103 * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
104 * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
105 * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
106 * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
107 * RST 9| |32 AREF
108 * VCC 10| |31 GND
109 * GND 11| |30 AVCC
110 * XTAL2 12| |29 PC7 (D 23)
111 * XTAL1 13| |28 PC6 (D 22)
112 * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
113 * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
114 * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
115 * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
116 * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
117 * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
118 * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
119 * +--------+
120 *
121 ****************************************************************************************/
122 #if MOTHERBOARD == 1
123 #define KNOWN_BOARD 1
124 
125 #ifndef __AVR_ATmega644P__
126 #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
127 #endif
128 
129 #define ORIG_X_STEP_PIN 15
130 #define ORIG_X_DIR_PIN 18
131 #define ORIG_X_ENABLE_PIN 19
132 #define ORIG_X_MIN_PIN 20
133 #define ORIG_X_MAX_PIN 21
134 
135 #define ORIG_Y_STEP_PIN 23
136 #define ORIG_Y_DIR_PIN 22
137 #define ORIG_Y_ENABLE_PIN 19
138 #define ORIG_Y_MIN_PIN 25
139 #define ORIG_Y_MAX_PIN 26
140 
141 #define ORIG_Z_STEP_PIN 29
142 #define ORIG_Z_DIR_PIN 30
143 #define ORIG_Z_ENABLE_PIN 31
144 #define ORIG_Z_MIN_PIN 2
145 #define ORIG_Z_MAX_PIN 1
146 
147 #define ORIG_E0_STEP_PIN 12
148 #define ORIG_E0_DIR_PIN 16
149 #define ORIG_E0_ENABLE_PIN 3
150 
151 #define SDPOWER -1
152 #define SDSS -1
153 #define LED_PIN 0
154 #define ORIG_FAN_PIN -1
155 #define ORIG_PS_ON_PIN -1
156 
157 #define HEATER_0_PIN 14
158 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
159 #define TEMP_0_PIN 4
160 #define HEATER_1_PIN -1
161 #define TEMP_1_PIN -1
162 #define HEATER_2_PIN -1
163 #define TEMP_2_PIN -1
164 
165 /* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */
166 
167 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
168 #define E1_PINS
169 
170 
171 #endif
172 
173 #if MOTHERBOARD == 91
174 #define KNOWN_BOARD 1
175 
176 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284__)
177 #error Oops! Make sure you have 'OMC with Atmega644 at 20 Mhz' selected from the 'Tools -> Boards' menu.
178 #endif
179 
180 #define ORIG_X_STEP_PIN 26
181 #define ORIG_X_DIR_PIN 25
182 #define ORIG_X_ENABLE_PIN 10
183 #define ORIG_X_MIN_PIN 0
184 #define ORIG_X_MAX_PIN -1
185 
186 #define ORIG_Y_STEP_PIN 28
187 #define ORIG_Y_DIR_PIN 27
188 #define ORIG_Y_ENABLE_PIN 10
189 #define ORIG_Y_MIN_PIN 1
190 #define ORIG_Y_MAX_PIN -1
191 
192 #define ORIG_Z_STEP_PIN 23
193 #define ORIG_Z_DIR_PIN 22
194 #define ORIG_Z_ENABLE_PIN 10
195 #define ORIG_Z_MIN_PIN 2
196 #define ORIG_Z_MAX_PIN -1
197 
198 #define ORIG_E0_STEP_PIN 24
199 #define ORIG_E0_DIR_PIN 21
200 #define ORIG_E0_ENABLE_PIN 10
201 
202 #define PROBE_PIN 13
203 
204 #define SDPOWER -1
205 #define SDSS -1
206 #define LED_PIN -1
207 #define ORIG_FAN_PIN 14
208 #define ORIG_PS_ON_PIN -1
209 
210 #define ORIG_SDCARDDETECT -1
211 
212 #define HEATER_0_PIN 3
213 #define TEMP_0_PIN 0
214 #define HEATER_1_PIN 4
215 #define TEMP_1_PIN 1
216 #define HEATER_2_PIN -1
217 #define TEMP_2_PIN 2
218 
219 #define SCK_PIN 7
220 #define MISO_PIN 6
221 #define MOSI_PIN 5
222 
223 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
224 
225 #endif
226 
227 /****************************************************************************************
228 * RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
229 *
230 ****************************************************************************************/
231 #if MOTHERBOARD == 2
232 #define KNOWN_BOARD 1
233 
234 #ifndef __AVR_ATmega644P__
235 #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
236 #endif
237 
238 #define ORIG_X_STEP_PIN 15
239 #define ORIG_X_DIR_PIN 18
240 #define ORIG_X_ENABLE_PIN 19
241 #define ORIG_X_MIN_PIN 20
242 #define ORIG_X_MAX_PIN 21
243 
244 #define ORIG_Y_STEP_PIN 23
245 #define ORIG_Y_DIR_PIN 22
246 #define ORIG_Y_ENABLE_PIN 24
247 #define ORIG_Y_MIN_PIN 25
248 #define ORIG_Y_MAX_PIN 26
249 
250 #define ORIG_Z_STEP_PINN 27
251 #define ORIG_Z_DIR_PINN 28
252 #define ORIG_Z_ENABLE_PIN 29
253 #define ORIG_Z_MIN_PIN 30
254 #define ORIG_Z_MAX_PIN 31
255 
256 #define ORIG_E0_STEP_PIN 17
257 #define ORIG_E0_DIR_PIN 16
258 #define ORIG_E0_ENABLE_PIN -1
259 
260 #define SDPOWER -1
261 #define SDSS 4
262 #define LED_PIN 0
263 
264 #define SD_CARD_WRITE 2
265 #define SD_CARD_DETECT 3
266 #define SD_CARD_SELECT 4
267 
268 //our RS485 pins
269 #define TX_ENABLE_PIN 12
270 #define RX_ENABLE_PIN 13
271 
272 //pin for controlling the PSU.
273 #define ORIG_PS_ON_PIN 14
274 
275 #define ORIG_FAN_PIN -1
276 
277 #define HEATER_0_PIN -1
278 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
279 #define TEMP_0_PIN -1
280 
281 
282 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
283 #define E1_PINS
284 
285 
286 #endif
287 
288 /****************************************************************************************
289 * Gen3 PLUS for RepRap Motherboard V1.2
290 *
291 ****************************************************************************************/
292 #if MOTHERBOARD == 21
293 #define KNOWN_BOARD 1
294 
295 #ifndef __AVR_ATmega644P__
296 #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
297 #endif
298 
299 //x axis pins
300 #define ORIG_X_STEP_PIN 15
301 #define ORIG_X_DIR_PIN 18
302 #define ORIG_X_ENABLE_PIN 19
303 #define ORIG_X_MIN_PIN 20
304 #define ORIG_X_MAX_PIN -1
305 
306 //y axis pins
307 #define ORIG_Y_STEP_PIN 23
308 #define ORIG_Y_DIR_PIN 22
309 #define ORIG_Y_ENABLE_PIN 24
310 #define ORIG_Y_MIN_PIN 25
311 #define ORIG_Y_MAX_PIN -1
312 
313 //z axis pins
314 #define ORIG_Z_STEP_PIN 27
315 #define ORIG_Z_DIR_PIN 28
316 #define ORIG_Z_ENABLE_PIN 29
317 #define ORIG_Z_MIN_PIN 30
318 #define ORIG_Z_MAX_PIN -1
319 
320 #define ORIG_E0_DIR_PIN 21
321 #define ORIG_E0_STEP_PIN 17
322 #define ORIG_E0_ENABLE_PIN 13
323 
324 //heaters
325 // hot end heater
326 #define HEATER_0_PIN 12
327 // heated bed heater
328 #define HEATER_1_PIN 16
329 #define HEATER_2_PIN -1
330 #define TEMP_2_PIN -1
331 
332 //pin for debugging.
333 #define DEBUG_PIN -1
334 //SD card pin
335 #define SDSS 4
336 #define SDPOWER -1
337 #define ORIG_FAN_PIN -1
338 #define TEMP_0_PIN 0
339 #define TEMP_1_PIN 5
340 #define LED_PIN -1
341 
342 //pin for controlling the PSU.
343 #define ORIG_PS_ON_PIN 14
344 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
345 #define E1_PINS
346 #endif
347 //----------end Gen3 PLUS for RepRap Motherboard V1.2--------------
348 
349 /****************************************************************************************
350 * Arduino Mega pin assignment
351 *
352 ****************************************************************************************/
353 #if MOTHERBOARD == 33
354 #define KNOWN_BOARD 1
355 #define RAMPS_V_1_3
356 #elif MOTHERBOARD == 34
357 #define KNOWN_BOARD 1
358 #define RAMPS_V_1_3
359 #define AZTEEG_X3
360 #elif MOTHERBOARD == 35
361 #define KNOWN_BOARD 1
362 #define RAMPS_V_1_3
363 #define AZTEEG_X3_PRO
364 #elif MOTHERBOARD == 39
365 #define KNOWN_BOARD 1
366 #define RAMPS_V_1_3
367 #define ZRIB_V2
368 #elif MOTHERBOARD == 38
369 #define RAMPS_V_1_3
370 #define MPX3
371 #endif
372 #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 39 || MOTHERBOARD == 38
373 #define KNOWN_BOARD 1
374 
375 #if !(defined (__AVR_ATmega1280__ ) || defined (__AVR_ATmega2560__ ))
376 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
377 #endif
378 
379 // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
380 // #define RAMPS_V_1_3
381 // #define RAMPS_V_1_0
382 
383 #ifdef RAMPS_V_1_3
384 
385 #define ORIG_X_STEP_PIN 54
386 #define ORIG_X_DIR_PIN 55
387 #define ORIG_X_ENABLE_PIN 38
388 #define ORIG_X_MIN_PIN 3
389 #define ORIG_X_MAX_PIN 2
390 
391 #define ORIG_Y_STEP_PIN 60
392 #define ORIG_Y_DIR_PIN 61
393 #define ORIG_Y_ENABLE_PIN 56
394 #define ORIG_Y_MIN_PIN 14
395 #define ORIG_Y_MAX_PIN 15
396 
397 #define ORIG_Z_STEP_PIN 46
398 #define ORIG_Z_DIR_PIN 48
399 #define ORIG_Z_ENABLE_PIN 62
400 #define ORIG_Z_MIN_PIN 18
401 #define ORIG_Z_MAX_PIN 19
402 
403 #define ORIG_E0_STEP_PIN 26
404 #define ORIG_E0_DIR_PIN 28
405 #define ORIG_E0_ENABLE_PIN 24
406 
407 #define ORIG_E1_STEP_PIN 36
408 #define ORIG_E1_DIR_PIN 34
409 #define ORIG_E1_ENABLE_PIN 30
410 
411 #define SDPOWER -1
412 #define SDSS 53
413 #define ORIG_SDCARDDETECT 49
414 
415 #define LED_PIN 13
416 #define ORIG_FAN_PIN 9
417 #define ORIG_PS_ON_PIN 12
418 
419 #define HEATER_0_PIN 10
420 #define HEATER_1_PIN 8
421 #define HEATER_2_PIN 9
422 // ANALOG NUMBERING
423 #define TEMP_0_PIN 13
424 #define TEMP_1_PIN 14
425 #define TEMP_2_PIN 15
426 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
427 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
428 
429 
430 #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
431 
432 #define ORIG_X_STEP_PIN 26
433 #define ORIG_X_DIR_PIN 28
434 #define ORIG_X_ENABLE_PIN 24
435 #define ORIG_X_MIN_PIN 3
436 #define ORIG_X_MAX_PIN -1 //2
437 
438 #define ORIG_Y_STEP_PIN 38
439 #define ORIG_Y_DIR_PIN 40
440 #define ORIG_Y_ENABLE_PIN 36
441 #define ORIG_Y_MIN_PIN 16
442 #define ORIG_Y_MAX_PIN -1 //17
443 
444 #define ORIG_Z_STEP_PIN 44
445 #define ORIG_Z_DIR_PIN 46
446 #define ORIG_Z_ENABLE_PIN 42
447 #define ORIG_Z_MIN_PIN 18
448 #define ORIG_Z_MAX_PIN -1 //19
449 
450 #define ORIG_E0_STEP_PIN 32
451 #define ORIG_E0_DIR_PIN 34
452 #define ORIG_E0_ENABLE_PIN 30
453 
454 #define SDPOWER 48
455 #define SDSS 53
456 #define LED_PIN 13
457 #define ORIG_PS_ON_PIN -1
458 //#define SCL 21
459 //#define SDA 20
460 
461 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
462 #define E1_PINS
463 
464 
465 #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
466 #define HEATER_0_PIN 12
467 #define HEATER_1_PIN -1
468 #define ORIG_FAN_PIN 11
469 
470 #else // RAMPS_V_1_1 or RAMPS_V_1_2
471 #define HEATER_0_PIN 10
472 #define HEATER_1_PIN 8
473 #define ORIG_FAN_PIN 9
474 #endif
475 
476 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
477 #define TEMP_0_PIN 2
478 #define TEMP_1_PIN 1
479 #endif
480 
481 // SPI for Max6675 Thermocouple
482 
483 // these pins are defined in the SD library if building with SD support
484 #define SCK_PIN 52
485 #define MISO_PIN 50
486 #define MOSI_PIN 51
487 #define MAX6675_SS 53
488 
489 #ifdef AZTEEG_X3
490 #define SDSUPPORT 1
491 #define SDCARDDETECTINVERTED 0
492 #define ORIG_SDCARDDETECT 49
493 #undef ORIG_FAN_PIN
494 #define ORIG_FAN_PIN 4
495 #define ORIG_FAN2_PIN 5
496 #define LIGHT_PIN 6
497 // Activate beeper on extension shield
498 #define BEEPER_PIN 33
499 #define BEEPER_TYPE 1
500 
501 // Only available with X3 shield
502 #define ORIG_E2_STEP_PIN 27
503 #define ORIG_E2_DIR_PIN 29
504 #define ORIG_E2_ENABLE_PIN 41
505 // Only available with X3 shield
506 #define ORIG_E3_STEP_PIN 23
507 #define ORIG_E3_DIR_PIN 25
508 #define ORIG_E3_ENABLE_PIN 40
509 // Only available with X3 shield
510 #define HEATER_3_PIN 17
511 #define TEMP_3_PIN 12
512 #define HEATER_4_PIN 16
513 #define TEMP_4_PIN 5
514 
515 
516 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
517 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
518 #define E3_PINS E3_STEP_PIN,E3_DIR_PIN,E3_ENABLE_PIN,
519 
520 #endif
521 
522 #ifdef AZTEEG_X3_PRO
523 #define SDSUPPORT 1
524 #define SDCARDDETECTINVERTED false
525 #define ORIG_SDCARDDETECT 49
526 #define SDSS 53
527 #undef ORIG_FAN_PIN
528 #define ORIG_FAN_PIN 5
529 #define ORIG_FAN2_PIN 6
530 #define LIGHT_PIN 11
531 // Activate beeper on extension shield
532 #define BEEPER_PIN 33
533 #define BEEPER_TYPE 1
534 
535 #define ORIG_E2_STEP_PIN 23
536 #define ORIG_E2_DIR_PIN 25
537 #define ORIG_E2_ENABLE_PIN 40
538 #define ORIG_E3_STEP_PIN 27
539 #define ORIG_E3_DIR_PIN 29
540 #define ORIG_E3_ENABLE_PIN 41
541 #define ORIG_E4_STEP_PIN 43
542 #define ORIG_E4_DIR_PIN 37
543 #define ORIG_E4_ENABLE_PIN 42
544 #define HEATER_0_PIN 10
545 // bed
546 #define HEATER_1_PIN 8
547 #define HEATER_2_PIN 9
548 #define HEATER_3_PIN 16
549 #define HEATER_4_PIN 17
550 #define HEATER_5_PIN 4
551 // ANALOG NUMBERING
552 #define TEMP_0_PIN 13
553 // BED , ANALOG NUMBERING
554 #define TEMP_1_PIN 14
555 #define TEMP_2_PIN 15
556 #define TEMP_3_PIN 12
557 #define TEMP_4_PIN 11
558 #define TEMP_5_PIN 10
559 
560 // Thermocouple 1 and 2
561 #define TEMP_6_PIN 4
562 #define TEMP_7_PIN 5
563 #define THERMOCOUPLE_0_PIN 4
564 #define THERMOCOUPLE_1_PIN 5
565 
566 // Special extension board for x3 pro allows 2 more extruders
567 
568 #define ORIG_E5_STEP_PIN 12
569 #define ORIG_E5_DIR_PIN 47
570 #define ORIG_E5_ENABLE_PIN 63
571 #define ORIG_E6_STEP_PIN 39
572 #define ORIG_E6_DIR_PIN 57
573 #define ORIG_E6_ENABLE_PIN 31
574 
575 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
576 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
577 #define E3_PINS ORIG_E3_STEP_PIN,ORIG_E3_DIR_PIN,ORIG_E3_ENABLE_PIN,
578 #define E4_PINS ORIG_E4_STEP_PIN,ORIG_E4_DIR_PIN,ORIG_E4_ENABLE_PIN,
579 #define E5_PINS ORIG_E5_STEP_PIN,ORIG_E5_DIR_PIN,ORIG_E5_ENABLE_PIN,
580 #define E6_PINS ORIG_E6_STEP_PIN,ORIG_E6_DIR_PIN,ORIG_E6_ENABLE_PIN,
581 
582 #endif
583 
584 // Zonestar ZRIB V2.1 Board
585 #ifdef ZRIB_V2
586 #undef HEATER_2_PIN
587 #define HEATER_2_PIN 7
588 #define ORIG_FAN2_PIN 6
589 #define SD_DETECT_PIN 49
590 #define LCD_PINS_RS 16
591 #define LCD_PINS_ENABLE 17
592 #define LCD_PINS_D4 23
593 #define LCD_PINS_D5 25
594 #define LCD_PINS_D6 27
595 #define LCD_PINS_D7 29
596 #define BEEPER_PIN 37
597 #endif
598 
599 #ifdef MPX3
600 #undef HEATER_1_PIN
601 #define HEATER_1_PIN 8
602 
603 #undef FAN_PIN
604 #define FAN_PIN 9
605 
606 #undef HEATER_0_PIN
607 #define HEATER_0_PIN 10
608 
609 #undef HEATER_2_PIN
610 #define HEATER_2_PIN 7
611 #endif
612 
613 #endif
614 
615 /****************************************************************************************
616 * Ultimaker Shield pin assignment v1.5.7
617 *
618 ****************************************************************************************/
619 #if MOTHERBOARD == 37
620 #define ULTIMAKER_157
621 #define KNOWN_BOARD 1
622 
623 #define ORIG_X_STEP_PIN 25
624 #define ORIG_X_DIR_PIN 23
625 #define ORIG_X_MIN_PIN 22
626 #define ORIG_X_MAX_PIN 24
627 #define ORIG_X_ENABLE_PIN 27
628 
629 #define ORIG_Y_STEP_PIN 31
630 #define ORIG_Y_DIR_PIN 33
631 #define ORIG_Y_MIN_PIN 26
632 #define ORIG_Y_MAX_PIN 28
633 #define ORIG_Y_ENABLE_PIN 29
634 
635 #define ORIG_Z_STEP_PIN 37
636 #define ORIG_Z_DIR_PIN 39
637 #define ORIG_Z_MIN_PIN 30
638 #define ORIG_Z_MAX_PIN 32
639 #define ORIG_Z_ENABLE_PIN 35
640 
641  // bed
642 #define HEATER_1_PIN 4
643 #define TEMP_1_PIN 10
644 
645 #define HEATER_0_PIN 2
646 #define TEMP_0_PIN 8
647 
648 #define HEATER_2_PIN 3
649 #define TEMP_2_PIN 9
650 
651 #define HEATER_3_PIN -1
652 #define TEMP_3_PIN -1
653 
654 #define ORIG_E0_STEP_PIN 43
655 #define ORIG_E0_DIR_PIN 45
656 #define ORIG_E0_ENABLE_PIN 41
657 #define E0_FAN_PIN -1
658 // #define EXT1_EXTRUDER_COOLER_PIN E0_FAN_PIN
659 
660 #define ORIG_E1_STEP_PIN 49
661 #define ORIG_E1_DIR_PIN 47
662 #define ORIG_E1_ENABLE_PIN 48
663 #define E1_FAN_PIN -1
664 // #define EXT2_EXTRUDER_COOLER_PIN E1_FAN_PIN
665 
666 #define LED_PIN 13
667 #define ORIG_FAN_PIN 7
668 #define ORIG_PS_ON_PIN 12
669 #define KILL_PIN -1
670 //PIN that has to be turned on right after start, to keep power flowing.
671 #define SUICIDE_PIN 54
672 
673 #define SCK_PIN 52
674 #define MISO_PIN 50
675 #define MOSI_PIN 51
676 #define SDPOWER -1
677 #define SDSS 53
678 #define ORIG_SDCARDDETECT 38
679 
680 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
681 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
682 
683 #endif
684 
685 /****************************************************************************************
686 * RUMBA pin assignment
687 *
688 ****************************************************************************************/
689 #if MOTHERBOARD == 80
690 #define KNOWN_BOARD 1
691 
692 #ifndef __AVR_ATmega2560__
693 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
694 #endif
695 
696 #define ORIG_X_STEP_PIN 17
697 #define ORIG_X_DIR_PIN 16
698 #define ORIG_X_ENABLE_PIN 48
699 #define ORIG_X_MIN_PIN 37
700 #define ORIG_X_MAX_PIN 36
701 
702 #define ORIG_Y_STEP_PIN 54
703 #define ORIG_Y_DIR_PIN 47
704 #define ORIG_Y_ENABLE_PIN 55
705 #define ORIG_Y_MIN_PIN 35
706 #define ORIG_Y_MAX_PIN 34
707 
708 #define ORIG_Z_STEP_PIN 57
709 #define ORIG_Z_DIR_PIN 56
710 #define ORIG_Z_ENABLE_PIN 62
711 #define ORIG_Z_MIN_PIN 33
712 #define ORIG_Z_MAX_PIN 32
713 
714 #define ORIG_E0_STEP_PIN 23
715 #define ORIG_E0_DIR_PIN 22
716 #define ORIG_E0_ENABLE_PIN 24
717 
718 #define ORIG_E1_STEP_PIN 26
719 #define ORIG_E1_DIR_PIN 25
720 #define ORIG_E1_ENABLE_PIN 27
721 
722 #define ORIG_E2_STEP_PIN 29
723 #define ORIG_E2_DIR_PIN 28
724 #define ORIG_E2_ENABLE_PIN 39
725 
726 #define LED_PIN 13
727 
728 #define ORIG_FAN_PIN 7
729 #define ORIG_FAN2_PIN 8 // (e.g. useful for electronics fan or light on/off) on PIN 8
730 
731 #define ORIG_PS_ON_PIN 45
732 
733  // EXTRUDER 1
734 #define HEATER_0_PIN 2
735 // EXTRUDER 2
736 #define HEATER_2_PIN 3
737 // EXTRUDER 3
738 #define HEATER_3_PIN 6
739 //optional FAN1 can be used as 4th heater output: #define HEATER_4_PIN 8 // EXTRUDER 4
740  // BED
741 #define HEATER_1_PIN 9
742 
743 // ANALOG NUMBERING
744 #define TEMP_0_PIN 15
745 #define TEMP_2_PIN 14
746 #define TEMP_3_PIN 13
747 //optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
748 #define TEMP_1_PIN 11
749 
750 #define SDPOWER -1
751 #define SDSS 53
752 #define SCK_PIN 52
753 #define MISO_PIN 50
754 #define MOSI_PIN 51
755 
756 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
757 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
758 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
759 
760 #endif //MOTHERBOARD==80
761 
762 /****************************************************************************************
763 * Duemilanove w/ ATMega328P pin assignment
764 *
765 ****************************************************************************************/
766 #if MOTHERBOARD == 4
767 #define KNOWN_BOARD 1
768 
769 #ifndef __AVR_ATmega328P__
770 #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
771 #endif
772 
773 #define ORIG_X_STEP_PIN 19
774 #define ORIG_X_DIR_PIN 18
775 #define ORIG_X_ENABLE_PIN -1
776 #define ORIG_X_MIN_PIN 17
777 #define ORIG_X_MAX_PIN -1
778 
779 #define ORIG_Y_STEP_PIN 10
780 #define ORIG_Y_DIR_PIN 7
781 #define ORIG_Y_ENABLE_PIN -1
782 #define ORIG_Y_MIN_PIN 8
783 #define ORIG_Y_MAX_PIN -1
784 
785 #define ORIG_Z_STEP_PIN 13
786 #define ORIG_Z_DIR_PIN 3
787 #define ORIG_Z_ENABLE_PIN 2
788 #define ORIG_Z_MIN_PIN 4
789 #define ORIG_Z_MAX_PIN -1
790 
791 #define ORIG_E0_STEP_PIN 11
792 #define ORIG_E0_DIR_PIN 12
793 #define ORIG_E0_ENABLE_PIN -1
794 
795 #define SDPOWER -1
796 #define SDSS -1
797 #define LED_PIN -1
798 #define ORIG_FAN_PIN 5
799 #define ORIG_PS_ON_PIN -1
800 
801 #define HEATER_0_PIN 6
802 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
803 #define TEMP_0_PIN 0
804 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
805 #define E1_PINS
806 
807 
808 #endif
809 
810 /****************************************************************************************
811 * Gen6 pin assignment (5) and Gen6 deluxe assignment (51)
812 *
813 ****************************************************************************************/
814 #if MOTHERBOARD == 5 || MOTHERBOARD == 51
815 #define KNOWN_BOARD 1
816 
817 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
818 #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
819 #endif
820 
821 //x axis pins
822 #define ORIG_X_STEP_PIN 15
823 #define ORIG_X_DIR_PIN 18
824 #define ORIG_X_ENABLE_PIN 19
825 #define ORIG_X_MIN_PIN 20
826 #define ORIG_X_MAX_PIN -1
827 
828 //y axis pins
829 #define ORIG_Y_STEP_PIN 23
830 #define ORIG_Y_DIR_PIN 22
831 #define ORIG_Y_ENABLE_PIN 24
832 #define ORIG_Y_MIN_PIN 25
833 #define ORIG_Y_MAX_PIN -1
834 
835 //z axis pins
836 #define ORIG_Z_STEP_PIN 27
837 #define ORIG_Z_DIR_PIN 28
838 #define ORIG_Z_ENABLE_PIN 29
839 #define ORIG_Z_MIN_PIN 30
840 #define ORIG_Z_MAX_PIN -1
841 
842 //extruder pins
843 #define ORIG_E0_STEP_PIN 4
844 #define ORIG_E0_DIR_PIN 2
845 #define ORIG_E0_ENABLE_PIN 3
846 #define TEMP_0_PIN 5
847 #define HEATER_0_PIN 14
848 #if MOTHERBOARD == 5
849 #define HEATER_1_PIN -1
850 #define TEMP_1_PIN -1
851 #else
852 #define HEATER_1_PIN 1
853 #define TEMP_1_PIN 0
854 #endif
855 #define HEATER_2_PIN -1
856 #define TEMP_2_PIN -1
857 
858 
859 #define SDPOWER -1
860 // SCL pin of I2C header
861 #define SDSS 16
862 #define LED_PIN -1
863 #define ORIG_FAN_PIN -1
864 #define ORIG_PS_ON_PIN -1
865 //our pin for debugging.
866 
867 #define DEBUG_PIN 0
868 
869 //our RS485 pins
870 #define TX_ENABLE_PIN 12
871 #define RX_ENABLE_PIN 13
872 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
873 #define E1_PINS
874 
875 #define SCK_PIN 7
876 #define MISO_PIN 6
877 #define MOSI_PIN 5
878 
879 // #define SCL 16
880 // #define SDA 17
881 
882 #endif
883 /****************************************************************************************
884 * Sanguinololu pin assignment
885 *
886 ****************************************************************************************/
887 #if MOTHERBOARD == 62
888 #define SANGUINOLOLU_V_1_2
889 #endif
890 #if MOTHERBOARD == 65
891 #define AZTEEG_X1
892 #define SANGUINOLOLU_V_1_2
893 #endif
894 
895 #if MOTHERBOARD == 6 || MOTHERBOARD == 62 || MOTHERBOARD == 65
896 #define KNOWN_BOARD 1
897 //#ifndef __AVR_ATmega644P__
898 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
899 #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
900 #endif
901 
902 #define ORIG_X_STEP_PIN 15
903 #define ORIG_X_DIR_PIN 21
904 #define ORIG_X_MIN_PIN 18
905 #define ORIG_X_MAX_PIN -2
906 
907 #define ORIG_Y_STEP_PIN 22
908 #define ORIG_Y_DIR_PIN 23
909 #define ORIG_Y_MIN_PIN 19
910 #define ORIG_Y_MAX_PIN -1
911 
912 #define ORIG_Z_STEP_PIN 3
913 #define ORIG_Z_DIR_PIN 2
914 #define ORIG_Z_MIN_PIN 20
915 #define ORIG_Z_MAX_PIN -1
916 
917 #define ORIG_E0_STEP_PIN 1
918 #define ORIG_E0_DIR_PIN 0
919 
920 #define LED_PIN -1
921 
922 #define ORIG_FAN_PIN -1
923 
924 #define ORIG_PS_ON_PIN -1
925 
926 // (extruder)
927 #define HEATER_0_PIN 13
928 
929 #ifdef SANGUINOLOLU_V_1_2
930 
931 // (bed)
932 #define HEATER_1_PIN 12
933 #define ORIG_X_ENABLE_PIN 14
934 #define ORIG_Y_ENABLE_PIN 14
935 #define ORIG_Z_ENABLE_PIN 26
936 #define ORIG_E0_ENABLE_PIN 14
937 
938 #else
939 
940 #define HEATER_1_PIN 14
941 #define ORIG_X_ENABLE_PIN -1
942 #define ORIG_Y_ENABLE_PIN -1
943 #define ORIG_Z_ENABLE_PIN -1
944 #define ORIG_E0_ENABLE_PIN -1
945 
946 #endif
947 
948 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
949 #define TEMP_0_PIN 7
950 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
951 #define TEMP_1_PIN 6
952 #define SDPOWER -1
953 #define SDSS 31
954 #define SCK_PIN 7
955 #define MISO_PIN 6
956 #define MOSI_PIN 5
957 #define HEATER_2_PIN -1
958 #define TEMP_2_PIN -1
959 
960 #ifdef AZTEEG_X1
961 #define ORIG_FAN_PIN 4
962 #endif
963 
964 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
965 #define E1_PINS
966 #define E2_PINS
967 
968 #ifndef KNOWN_BOARD
969 #error Unknown MOTHERBOARD value in configuration.h
970 #endif
971 
972 #endif
973 
974 /****************************************************************************************
975 * Melzi pin assignment
976 *
977 ****************************************************************************************/
978 #if MOTHERBOARD == 63
979 #define KNOWN_BOARD 1
980 #ifndef __AVR_ATmega644P__
981 #ifndef __AVR_ATmega1284P__
982 //#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
983 #endif
984 #endif
985 
986 #define ORIG_X_STEP_PIN 15
987 #define ORIG_X_DIR_PIN 21
988 #define ORIG_X_MIN_PIN 18
989 #define ORIG_X_MAX_PIN -2
990 
991 #define ORIG_Y_STEP_PIN 22
992 #define ORIG_Y_DIR_PIN 23
993 #define ORIG_Y_MIN_PIN 19
994 #define ORIG_Y_MAX_PIN -1
995 
996 #define ORIG_Z_STEP_PIN 3
997 #define ORIG_Z_DIR_PIN 2
998 #define ORIG_Z_MIN_PIN 20
999 #define ORIG_Z_MAX_PIN -1
1000 
1001 #define ORIG_E0_STEP_PIN 1
1002 #define ORIG_E0_DIR_PIN 0
1003 #define ORIG_E0_ENABLE_PIN 14
1004 
1005 //29 on Melzi1284p A2
1006 #define PROBE_PIN -1
1007 
1008 #define LED_PIN 27
1009 
1010 #define ORIG_FAN_PIN 4
1011 
1012 #define ORIG_PS_ON_PIN -1
1013 
1014 // (extruder)
1015 #define HEATER_0_PIN 13
1016 #define HEATER_2_PIN -1
1017 // bed (change to 12 for breakout pin on header)
1018 #define HEATER_1_PIN 10
1019 
1020 #define ORIG_X_ENABLE_PIN 14
1021 #define ORIG_Y_ENABLE_PIN 14
1022 #define ORIG_Z_ENABLE_PIN 26
1023 
1024 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
1025 #define TEMP_0_PIN 7
1026 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
1027 #define TEMP_1_PIN 6
1028 #define TEMP_2_PIN -1
1029 #define SDPOWER -1
1030 // 31 http://reprap.org/wiki/Melzi#Melzi_Arduino_Pin_Numbers says 31, schematic show pin 37 = PA0 which is arduino pin 31!
1031 #define SDSS 31
1032 #define SCK_PIN 7
1033 #define MISO_PIN 6
1034 #define MOSI_PIN 5
1035 #define SDSUPPORT 1 // sd card reader on board
1036 #define ORIG_SDCARDDETECT -1
1037 
1038 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1039 #define E1_PINS
1040 
1041 #endif
1042 
1043 #if MOTHERBOARD == 66
1044 #define KNOWN_BOARD 1
1045 
1046 #ifndef __AVR_ATmega2560__
1047 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
1048 #endif
1049 
1050 // X/Y/Z Steppers and MIN endstops verified
1051 
1052 #define ORIG_X_STEP_PIN 54
1053 #define ORIG_X_DIR_PIN 55
1054 #define ORIG_X_ENABLE_PIN 38
1055 #define ORIG_X_MIN_PIN 3
1056 #define ORIG_X_MAX_PIN -1
1057 
1058 #define ORIG_Y_STEP_PIN 60
1059 #define ORIG_Y_DIR_PIN 61
1060 #define ORIG_Y_ENABLE_PIN 56
1061 #define ORIG_Y_MIN_PIN 14
1062 #define ORIG_Y_MAX_PIN -1
1063 
1064 #define ORIG_Z_STEP_PIN 46
1065 #define ORIG_Z_DIR_PIN 48
1066 #define ORIG_Z_ENABLE_PIN 63
1067 #define ORIG_Z_MIN_PIN 18
1068 #define ORIG_Z_MAX_PIN -1
1069 
1070 #define ORIG_E0_STEP_PIN 26
1071 #define ORIG_E0_DIR_PIN 28
1072 #define ORIG_E0_ENABLE_PIN 24
1073 
1074 #define ORIG_E1_STEP_PIN -1
1075 #define ORIG_E1_DIR_PIN -1
1076 #define ORIG_E1_ENABLE_PIN -1
1077 
1078 #define SDPOWER -1
1079 #define SDSS 25
1080 #define ORIG_SDCARDDETECT -1
1081 
1082 #define LED_PIN 13
1083 #define ORIG_FAN_PIN 8
1084 #define ORIG_PS_ON_PIN -1
1085 
1086 // schematic: HEATER1 (Extruder)
1087 #define HEATER_0_PIN 10
1088 // schematic: HEATER2 (Heated Bed)
1089 #define HEATER_1_PIN 9
1090 #define HEATER_2_PIN -1
1091 
1092 // ANALOG NUMBERING
1093 // schematic: THERM1 (Extruder)
1094 #define TEMP_0_PIN 13
1095 // schematic: THERM2 (Heated Bed)
1096 #define TEMP_1_PIN 14
1097 #define TEMP_2_PIN -1
1098 
1099 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1100 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
1101 
1102 // following pins (LCD, ENCODER, SDCARD) reverse engineered from schematic diagram:
1103 
1104 #ifdef ULTRA_LCD
1105 #ifdef NEWPANEL
1106 
1107 #define LCD_PINS_RS 27
1108 #define LCD_PINS_ENABLE 29
1109 #define LCD_PINS_D4 37
1110 #define LCD_PINS_D5 35
1111 #define LCD_PINS_D6 33
1112 #define LCD_PINS_D7 31
1113 
1114 #define BTN_EN1 16
1115 #define BTN_EN2 17
1116 #define BTN_ENC 23
1117 
1118 #endif
1119 #endif //ULTRA_LCD
1120 
1121 #define SCK_PIN 52
1122 #define MISO_PIN 50
1123 #define MOSI_PIN 51
1124 #define MAX6675_SS 53
1125 #endif
1126 
1127 /****************************************************************************************
1128 * Gen7 1.1 and above pin assignment
1129 *
1130 ****************************************************************************************/
1131 #if MOTHERBOARD == 7
1132 #define KNOWN_BOARD 1
1133 
1134 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
1135 #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
1136 #endif
1137 
1138 //x axis pins
1139 #define ORIG_X_STEP_PIN 19
1140 #define ORIG_X_DIR_PIN 18
1141 #define ORIG_X_ENABLE_PIN 24
1142 #define ORIG_X_MIN_PIN 7
1143 #define ORIG_X_MAX_PIN 6
1144 
1145 //y axis pins
1146 #define ORIG_Y_STEP_PIN 23
1147 #define ORIG_Y_DIR_PIN 22
1148 #define ORIG_Y_ENABLE_PIN 24
1149 #define ORIG_Y_MIN_PIN 5
1150 #define ORIG_Y_MAX_PIN 2
1151 
1152 //z axis pins
1153 #define ORIG_Z_STEP_PIN 26
1154 #define ORIG_Z_DIR_PIN 25
1155 #define ORIG_Z_ENABLE_PIN 24
1156 #define ORIG_Z_MIN_PIN 1
1157 #define ORIG_Z_MAX_PIN 0
1158 
1159 //extruder pins
1160 #define ORIG_E0_STEP_PIN 28
1161 #define ORIG_E0_DIR_PIN 27
1162 #define ORIG_E0_ENABLE_PIN 24
1163 #define TEMP_0_PIN 1
1164 #define TEMP_1_PIN 2
1165 #define HEATER_0_PIN 4
1166 #define HEATER_1_PIN 3
1167 #define HEATER_2_PIN -1
1168 #define TEMP_2_PIN -1
1169 
1170 
1171 #define SDPOWER -1
1172 #define SDSS -1 // SCL pin of I2C header
1173 #define LED_PIN -1
1174 
1175 #define ORIG_FAN_PIN 31
1176 #define ORIG_PS_ON_PIN 15
1177 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1178 #define E1_PINS
1179 
1180 //our pin for debugging.
1181 
1182 #define DEBUG_PIN 0
1183 
1184 //our RS485 pins
1185 #define TX_ENABLE_PIN 12
1186 #define RX_ENABLE_PIN 13
1187 
1188 #define SCK_PIN 7
1189 #define SDSSORIG 4
1190 #define MISO_PIN 6
1191 #define MOSI_PIN 5
1192 
1193 #endif
1194 /****************************************************************************************
1195 * Gen7 1.4.1 pin assignment
1196 *
1197 ****************************************************************************************/
1198 #if MOTHERBOARD == 71
1199 #define KNOWN_BOARD 1
1200 
1201 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
1202 #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
1203 #endif
1204 
1205 //x axis pins
1206 #define ORIG_X_STEP_PIN 29
1207 #define ORIG_X_DIR_PIN 28
1208 #define ORIG_X_ENABLE_PIN 25
1209 #define ORIG_X_MIN_PIN 0
1210 #define ORIG_X_MAX_PIN -1
1211 
1212 //y axis pins
1213 #define ORIG_Y_STEP_PIN 27
1214 #define ORIG_Y_DIR_PIN 26
1215 #define ORIG_Y_ENABLE_PIN 25
1216 #define ORIG_Y_MIN_PIN 1
1217 #define ORIG_Y_MAX_PIN -1
1218 
1219 //z axis pins
1220 #define ORIG_Z_STEP_PIN 23
1221 #define ORIG_Z_DIR_PIN 22
1222 #define ORIG_Z_ENABLE_PIN 25
1223 #define ORIG_Z_MIN_PIN 2
1224 #define ORIG_Z_MAX_PIN -1
1225 
1226 //extruder pins
1227 #define ORIG_E0_STEP_PIN 19
1228 #define ORIG_E0_DIR_PIN 18
1229 #define ORIG_E0_ENABLE_PIN 25
1230 #define TEMP_0_PIN 1
1231 #define TEMP_1_PIN 0
1232 #define HEATER_0_PIN 4
1233 #define HEATER_1_PIN 3
1234 #define HEATER_2_PIN -1
1235 #define TEMP_2_PIN -1
1236 
1237 
1238 #define SDPOWER -1
1239 #define SDSS -1
1240 #define LED_PIN -1
1241 
1242 #define ORIG_FAN_PIN -1
1243 #define ORIG_PS_ON_PIN 15
1244 //our pin for debugging.
1245 
1246 #define DEBUG_PIN 0
1247 
1248 //our RS485 pins
1249 #define TX_ENABLE_PIN 12
1250 #define RX_ENABLE_PIN 13
1251 
1252 #define SDPOWER -1
1253 #define SDSS -1
1254 // Needs to set this to output to enable SPI even if other SS is used!
1255 #define SDSSORIG 4
1256 
1257 #define SCK_PIN 7
1258 #define MISO_PIN 6
1259 #define MOSI_PIN 5
1260 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1261 #define E1_PINS
1262 #endif
1263 
1264 /****************************************************************************************
1265 * Sethi 3D_1 Extruder
1266 *
1267 ****************************************************************************************/
1268 #if MOTHERBOARD == 72
1269 #define KNOWN_BOARD 1
1270 
1271 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
1272 #error Oops! Make sure you have 'Sethi' selected from the 'Tools -> Boards' menu.
1273 #endif
1274 
1275 //x axis pins
1276 #define ORIG_X_STEP_PIN 19
1277 #define ORIG_X_DIR_PIN 18
1278 #define ORIG_X_ENABLE_PIN 24
1279 #define ORIG_X_MIN_PIN 2
1280 #define ORIG_X_MAX_PIN 6
1281 
1282 //y axis pins
1283 #define ORIG_Y_STEP_PIN 23
1284 #define ORIG_Y_DIR_PIN 22
1285 #define ORIG_Y_ENABLE_PIN 24
1286 #define ORIG_Y_MIN_PIN 0
1287 #define ORIG_Y_MAX_PIN 2
1288 
1289 //z axis pins
1290 #define ORIG_Z_STEP_PIN 26
1291 #define ORIG_Z_DIR_PIN 25
1292 #define ORIG_Z_ENABLE_PIN 24
1293 #define ORIG_Z_MIN_PIN 1
1294 #define ORIG_Z_MAX_PIN 0
1295 
1296 //extruder pins
1297 #define ORIG_E0_STEP_PIN 28
1298 #define ORIG_E0_DIR_PIN 27
1299 #define ORIG_E0_ENABLE_PIN 24
1300 #define TEMP_0_PIN 1
1301 #define TEMP_1_PIN 2
1302 #define HEATER_0_PIN 4
1303 #define HEATER_1_PIN 3
1304 
1305 
1306 #define SDPOWER -1
1307 #define SDSS -1 // SCL pin of I2C header
1308 #define LED_PIN -1
1309 
1310 #define ORIG_FAN_PIN 31
1311 #define ORIG_PS_ON_PIN 15
1312 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1313 #define E1_PINS
1314 
1315 //our pin for debugging.
1316 
1317 #define DEBUG_PIN 0
1318 
1319 //our RS485 pins
1320 #define TX_ENABLE_PIN 12
1321 #define RX_ENABLE_PIN 13
1322 
1323 #define SCK_PIN 7
1324 #define SDSSORIG 4
1325 #define MISO_PIN 6
1326 #define MOSI_PIN 5
1327 
1328 #endif
1329 
1330 /****************************************************************************************
1331  OpenHardware.co.za FrontPrint Controller 1.0
1332 ****************************************************************************************/
1333 #if MOTHERBOARD == 73
1334 #define KNOWN_BOARD 1
1335 
1336 #if !defined(AVR_ATmega644P) && !defined(AVR_ATmega644) && !defined(AVR_ATmega1284P)
1337 #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
1338 #endif
1339 
1340 //x axis pins
1341 #define ORIG_X_STEP_PIN 29
1342 #define ORIG_X_DIR_PIN 28
1343 #define ORIG_X_ENABLE_PIN 25
1344 #define ORIG_X_MIN_PIN 0
1345 #define ORIG_X_MAX_PIN -1
1346 
1347 //y axis pins
1348 #define ORIG_Y_STEP_PIN 27
1349 #define ORIG_Y_DIR_PIN 26
1350 #define ORIG_Y_ENABLE_PIN 25
1351 #define ORIG_Y_MIN_PIN 1
1352 #define ORIG_Y_MAX_PIN -1
1353 
1354 //z axis pins
1355 #define ORIG_Z_STEP_PIN 23
1356 #define ORIG_Z_DIR_PIN 22
1357 #define ORIG_Z_ENABLE_PIN 25
1358 #define ORIG_Z_MIN_PIN 2
1359 #define ORIG_Z_MAX_PIN -1
1360 
1361 //First extruder pins
1362 #define ORIG_E0_STEP_PIN 19
1363 #define ORIG_E0_DIR_PIN 18
1364 #define ORIG_E0_ENABLE_PIN 25
1365 #define TEMP_0_PIN 1
1366 #define HEATER_0_PIN 4
1367 
1368 //Second Extruder pins
1369 #define ORIG_E1_STEP_PIN 20
1370 #define ORIG_E1_DIR_PIN 18
1371 #define ORIG_E1_ENABLE_PIN 25
1372 
1373 #define TEMP_2_PIN 7
1374 #define HEATER_2_PIN 13
1375 
1376 //Heated Bed Pins
1377 #define HEATER_1_PIN 3
1378 #define TEMP_1_PIN 0
1379 
1380 //SD Card Pins
1381 #define SDPOWER -1
1382 #define SDSS 14
1383 #define SCK_PIN 7
1384 #define MISO_PIN 6
1385 #define MOSI_PIN 5
1386 
1387 //FAN and ATX Power Supply Control Pins
1388 #define ORIG_FAN_PIN 21
1389 #define ORIG_PS_ON_PIN 15
1390 
1391 #define LED_PIN -1
1392 #define SDSUPPORT 1 // sd card reader on board
1393 #define ORIG_SDCARDDETECT -1
1394 
1395 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1396 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
1397 #endif
1398 
1399 /****************************************************************************************
1400 * Teensylu 0.7 pin assingments (ATMEGA90USB)
1401 * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
1402 ****************************************************************************************/
1403 #if MOTHERBOARD == 8
1404 #define KNOWN_BOARD 1
1405 
1406 #define ORIG_X_STEP_PIN 28
1407 #define ORIG_X_DIR_PIN 29
1408 #define ORIG_X_ENABLE_PIN 19
1409 #define ORIG_X_MIN_PIN 25
1410 #define ORIG_X_MAX_PIN -1
1411 
1412 #define ORIG_Y_STEP_PIN 30
1413 #define ORIG_Y_DIR_PIN 31
1414 #define ORIG_Y_ENABLE_PIN 20
1415 #define ORIG_Y_MIN_PIN 26
1416 #define ORIG_Y_MAX_PIN -1
1417 
1418 #define ORIG_Z_STEP_PIN 32
1419 #define ORIG_Z_DIR_PIN 33
1420 #define ORIG_Z_ENABLE_PIN 17
1421 #define ORIG_Z_MIN_PIN 27
1422 #define ORIG_Z_MAX_PIN -1
1423 
1424 #define ORIG_E0_STEP_PIN 34
1425 #define ORIG_E0_DIR_PIN 35
1426 #define ORIG_E0_ENABLE_PIN 13
1427 
1428 // Extruder - ANALOG PIN NUMBER!
1429 #define TEMP_0_PIN 7
1430 // Bed - ANALOG PIN NUMBER!
1431 #define TEMP_1_PIN 6
1432 // Extruder
1433 #define HEATER_0_PIN 15
1434 // bed
1435 #define HEATER_1_PIN 14
1436 #define HEATER_2_PIN -1
1437 #define TEMP_2_PIN -1
1438 
1439 #define SDPOWER -1
1440 #define SDSS 20
1441 #define LED_PIN -1
1442 
1443 #define ORIG_FAN_PIN 16 // Fan
1444 #define ORIG_PS_ON_PIN -1
1445 
1446 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1447 #define E1_PINS
1448 
1449 #if !SDSUPPORT
1450 // these pins are defined in the SD library if building with SD support
1451 #define SCK_PIN 21
1452 #define MISO_PIN 23
1453 #define MOSI_PIN 22
1454 #endif
1455 
1456 #endif
1457 
1458 /****************************************************************************************
1459 * Unique One rev. A pin assingments (ATMEGA90USB)
1460 * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
1461 ****************************************************************************************/
1462 #if MOTHERBOARD == 88
1463 #define KNOWN_BOARD 1
1464 
1465 #define ORIG_X_STEP_PIN 28
1466 #define ORIG_X_DIR_PIN 29
1467 #define ORIG_X_ENABLE_PIN 19
1468 #define ORIG_X_MIN_PIN 25
1469 #define ORIG_X_MAX_PIN -1
1470 
1471 #define ORIG_Y_STEP_PIN 30
1472 #define ORIG_Y_DIR_PIN 31
1473 #define ORIG_Y_ENABLE_PIN 18
1474 #define ORIG_Y_MIN_PIN 26
1475 #define ORIG_Y_MAX_PIN -1
1476 
1477 #define ORIG_Z_STEP_PIN 32
1478 #define ORIG_Z_DIR_PIN 33
1479 #define ORIG_Z_ENABLE_PIN 17
1480 #define ORIG_Z_MIN_PIN 27
1481 #define ORIG_Z_MAX_PIN -1
1482 
1483 #define ORIG_E0_STEP_PIN 34
1484 #define ORIG_E0_DIR_PIN 35
1485 #define ORIG_E0_ENABLE_PIN 12
1486 // Extruder
1487 #define HEATER_0_PIN 8
1488 // Extruder - ANALOG PIN NUMBER!
1489 #define TEMP_0_PIN 5
1490 
1491 #define ORIG_E1_STEP_PIN 14
1492 #define ORIG_E1_DIR_PIN 13
1493 #define ORIG_E1_ENABLE_PIN 11
1494 // Extruder
1495 #define HEATER_2_PIN 9
1496 // Extruder - ANALOG PIN NUMBER!
1497 #define TEMP_2_PIN 6
1498 
1499 // bed
1500 #define HEATER_1_PIN 10
1501 // Bed - ANALOG PIN NUMBER!
1502 #define TEMP_1_PIN 7
1503 
1504 #define SDPOWER -1
1505 #define SDSS 20
1506 #define LED_PIN -1
1507 
1508 // Fan
1509 #define ORIG_FAN_PIN 16
1510 #define ORIG_PS_ON_PIN -1
1511 
1512 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1513 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
1514 
1515 #if !SDSUPPORT
1516 // these pins are defined in the SD library if building with SD support
1517 #define SCK_PIN 21
1518 #define MISO_PIN 23
1519 #define MOSI_PIN 22
1520 #endif
1521 
1522 #endif
1523 
1524 /****************************************************************************************
1525 * Printrboard Rev. F pin assingments (ATMEGA90USB1286)
1526 * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
1527 * See http://reprap.org/wiki/Printrboard for more info
1528 *
1529 * Rev. F uses an MCP4728 DAC to generate the Reference Voltage used to determine the
1530 * Stepper Driver's maximum current.
1531 *
1532 * On PrintrBoard, with Sense Resistors = 0.11 Ohms, and 2 Amps maximum current rating,
1533 * the Maximum VRef to send is calculated as:
1534 *
1535 * 2.00 Amps Maximum Output * (8 * 0.11 Ohms) = 1.76 Maximum VRef from MCP4728.
1536 *
1537 ****************************************************************************************/
1538 #if MOTHERBOARD == 92
1539 #define KNOWN_BOARD 1
1540 
1541 // Definition for current control
1542 #define STEPPER_CURRENT_CONTROL CURRENT_CONTROL_MCP4728
1543 
1544 #define MCP4728_I2C_ADDRESS 0x60 << 1 // Base Address (0x60); Pre-Shifted Left 1 bit for Repetier HAL.
1545 #define MCP4728_GENERALCALL_ADDRESS 0x00 // General Call Address. Weird, but OK...
1546 #define MCP4728_CMD_MULTI_WRITE 0B01000000 // Writes DAC Settings, Does not update EEPROM.
1547 #define MCP4728_CMD_SEQ_WRITE 0B01010000 // Writes DAC Settings, also persists to EEPROM.
1548 #define MCP4728_CMD_GC_UPDATE 0B00001000 // General Call Update - Update all DAC Outputs (Only way to update DAC Outputs on PrintrBoard Rev F because they tied /LDAC to VDD.
1549 #define MCP4728_CMD_GC_RESET 0B00000110 // General Call Reset
1550 #define MCP4728_VREF 1 // From DataSheet. We will use MCP4728's internal 2.048V as Vref
1551 #define MCP4728_GAIN 0 // From DataSheet. Use 1x Gain Multiplier (0V - 2.048V);
1552 #define MCP4728_NUM_CHANNELS 4 // Duh. Specified here in case there's a beefier chip used on some other board someday.
1553 #define MCP4728_STEPPER_ORDER {3,2,1,0} // PrintrBoard wired 'em up backwards. SMH. X, Y, Z, E
1554 #define MCP4728_VOUT_MAX 3520 // 1.76 Volts * 2000. See DataSheets for the math. Value should be between 0-4095
1555 
1556 #define ORIG_X_STEP_PIN 28
1557 #define ORIG_X_DIR_PIN 29
1558 #define ORIG_X_ENABLE_PIN 19
1559 #define ORIG_X_MIN_PIN 47
1560 #define ORIG_X_MAX_PIN -1
1561 
1562 #define ORIG_Y_STEP_PIN 30
1563 #define ORIG_Y_DIR_PIN 31
1564 #define ORIG_Y_ENABLE_PIN 18
1565 // (Was Pin 20 on Rev B-E); Don't use this if you want to use SD card. Use 37 and put the endstop in the e-stop slot!!!
1566 #define ORIG_Y_MIN_PIN 24
1567 #define ORIG_Y_MAX_PIN -1
1568 
1569 #define ORIG_Z_STEP_PIN 32
1570 #define ORIG_Z_DIR_PIN 33
1571 #define ORIG_Z_ENABLE_PIN 17
1572 #define ORIG_Z_MIN_PIN 36
1573 #define ORIG_Z_MAX_PIN -1
1574 
1575 #define ORIG_E0_STEP_PIN 34
1576 #define ORIG_E0_DIR_PIN 35
1577 #define ORIG_E0_ENABLE_PIN 13
1578 // Extruder - ANALOG PIN NUMBER!
1579 #define TEMP_0_PIN 1
1580 // Bed - ANALOG PIN NUMBER!
1581 #define TEMP_1_PIN 0
1582 // Extruder
1583 #define HEATER_0_PIN 15
1584 // bed
1585 #define HEATER_1_PIN 14
1586 #define HEATER_2_PIN -1
1587 #define TEMP_2_PIN -1
1588 
1589 #define SDPOWER -1
1590 // (Was Pin 26 on Rev. B-E); old value 2
1591 #define SDSS 20
1592 #define LED_PIN -1
1593 
1594 // Fan
1595 #define ORIG_FAN_PIN 16
1596 #define ORIG_PS_ON_PIN -1
1597 
1598 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1599 #define E1_PINS
1600 #if !SDSUPPORT
1601 // these pins are defined in the SD library if building with SD support
1602 #define SCK_PIN 21
1603 #define MISO_PIN 23
1604 #define MOSI_PIN 22
1605 #endif
1606 
1607 #endif
1608 
1609 
1610 /****************************************************************************************
1611 * Printrboard Rev. B pin assingments (ATMEGA90USB1286)
1612 * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
1613 * See http://reprap.org/wiki/Printrboard for more info
1614 ****************************************************************************************/
1615 #if MOTHERBOARD == 9
1616 #define KNOWN_BOARD 1
1617 
1618 #define ORIG_X_STEP_PIN 28
1619 #define ORIG_X_DIR_PIN 29
1620 #define ORIG_X_ENABLE_PIN 19
1621 #define ORIG_X_MIN_PIN 47
1622 #define ORIG_X_MAX_PIN -1
1623 
1624 #define ORIG_Y_STEP_PIN 30
1625 #define ORIG_Y_DIR_PIN 31
1626 #define ORIG_Y_ENABLE_PIN 18
1627 // Don't use this if you want to use SD card. Use 37 and put the endstop in the e-stop slot!!!
1628 #define ORIG_Y_MIN_PIN 20
1629 #define ORIG_Y_MAX_PIN -1
1630 
1631 #define ORIG_Z_STEP_PIN 32
1632 #define ORIG_Z_DIR_PIN 33
1633 #define ORIG_Z_ENABLE_PIN 17
1634 #define ORIG_Z_MIN_PIN 36
1635 #define ORIG_Z_MAX_PIN -1
1636 
1637 #define ORIG_E0_STEP_PIN 34
1638 #define ORIG_E0_DIR_PIN 35
1639 #define ORIG_E0_ENABLE_PIN 13
1640 // Extruder - ANALOG PIN NUMBER!
1641 #define TEMP_0_PIN 1
1642 // Bed - ANALOG PIN NUMBER!
1643 #define TEMP_1_PIN 0
1644 // Extruder
1645 #define HEATER_0_PIN 15
1646 // bed
1647 #define HEATER_1_PIN 14
1648 #define HEATER_2_PIN -1
1649 #define TEMP_2_PIN -1
1650 
1651 #define SDPOWER -1
1652 // old value 2
1653 #define SDSS 26
1654 #define LED_PIN -1
1655 
1656 #define ORIG_FAN_PIN 16
1657 #define ORIG_PS_ON_PIN -1
1658 
1659 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1660 #define E1_PINS
1661 #if !SDSUPPORT
1662 // these pins are defined in the SD library if building with SD support
1663 #define SCK_PIN 21
1664 #define MISO_PIN 23
1665 #define MOSI_PIN 22
1666 #endif
1667 
1668 #endif
1669 
1670 /****************************************************************************************
1671 * 3D Master pin assignment
1672 *
1673 ****************************************************************************************/
1674 #if MOTHERBOARD == 12
1675 #define KNOWN_BOARD 1
1676 
1677 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
1678 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
1679 #endif
1680 
1681 // Definition for current control
1682 #define STEPPER_CURRENT_CONTROL CURRENT_CONTROL_LTC2600
1683 #define LTC2600_CHANNELS {0x30,0x31,0x32,0x33,0x34}
1684 #define LTC2600_NUM_CHANNELS 5
1685 #define LTC2600_CS_PIN 92 // PIND.4, 47, DA_CS
1686 #define LTC2600_SCK_PIN 93 // PIND.5, 48, DA_SCK
1687 #define LTC2600_SDI_PIN 94 // PIND.6, 49, DA_SDI
1688 
1689 // On board beeper, so define values already here
1690 #define BEEPER_PIN 23
1691 #define BEEPER_TYPE 1
1692 #define SDSUPPORT 1 // sd card reader on board
1693 #define ORIG_SDCARDDETECT -1
1694 
1695 // digital pin mappings
1696 // PINF.0, 97, STP_DRV1
1697 #define ORIG_X_STEP_PIN 54
1698 // PINF.1, 96, DIR_DRV1
1699 #define ORIG_X_DIR_PIN 55
1700 // PIND.7, 50, ENA_DRV1
1701 #define ORIG_X_ENABLE_PIN 38
1702 // PINE.5, 7, OPTO1
1703 #define ORIG_X_MIN_PIN 3
1704 #define ORIG_X_MAX_PIN -1 // PINJ.0, 63, OPTO4 (would be "15", -1 = disabled)
1705 
1706 // PINF.6, 91, STP_DRV2
1707 #define ORIG_Y_STEP_PIN 60
1708 // PINF.7, 90, DIR_DRV2
1709 #define ORIG_Y_DIR_PIN 61
1710 // PINF.2, 95, ENA_DRV2
1711 #define ORIG_Y_ENABLE_PIN 56
1712 // PINE.4, 6, OPTO2
1713 #define ORIG_Y_MIN_PIN 2
1714 // PIND.3, 46, OPTO5 (would be "18", -1 = disabled
1715 #define ORIG_Y_MAX_PIN -1
1716 
1717 // PINL.3, 38, STP_DRV3
1718 #define ORIG_Z_STEP_PIN 46
1719 // PINL.1, 36, DIR_DRV3
1720 #define ORIG_Z_DIR_PIN 48
1721 // PINK.0, 89, ENA_DRV3
1722 #define ORIG_Z_ENABLE_PIN 62
1723 // PINJ.1, 64, OPTO3
1724 #define ORIG_Z_MIN_PIN 14
1725 #define ORIG_Z_MAX_PIN -1 // PIND.2, 45, OPTO6 (would be "19", -1 = disabled)
1726 
1727 // PINA.4, 74, STP_DRV4
1728 #define ORIG_E0_STEP_PIN 26
1729 // PINA.6, 72, DIR_DRV4
1730 #define ORIG_E0_DIR_PIN 28
1731 // PINA.2, 76 ENA_DRV4
1732 #define ORIG_E0_ENABLE_PIN 24
1733 
1734 // PINC.1, 54, STP_DRV5
1735 #define ORIG_E1_STEP_PIN 36
1736 // PINC.3, 56, DIR_DRV5
1737 #define ORIG_E1_DIR_PIN 34
1738 // PINC.7, 60, ENA_DRV5
1739 #define ORIG_E1_ENABLE_PIN 30
1740 
1741 #define SDPOWER -1
1742 // PINB.0, 19, SS
1743 #define SDSS 53
1744 // PINB.7, 26, LED13
1745 #define LED_PIN 13
1746 // OUT1 PINA.3, 75, OUT1
1747 #define ORIG_FAN_PIN 25
1748 // OUT2
1749 #define FAN_BOARD_PIN 27
1750 #define ORIG_PS_ON_PIN -1
1751 
1752 // PINB.4, 23, HZ1
1753 #define HEATER_0_PIN 10
1754 // PINH.6, 18, HZ2
1755 #define HEATER_1_PIN 9
1756 // PINH.5, 17, HZ3
1757 #define HEATER_2_PIN 8
1758 
1759 // analog pin mappings
1760 // PINK.5, 84, TH1
1761 #define TEMP_0_PIN 13
1762  // PINK.6, 83, TH2
1763 #define TEMP_1_PIN 14
1764 // PINK.7, 82, TH3
1765 #define TEMP_2_PIN 15
1766 
1767 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1768 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
1769 
1770 // these pins are defined in the SD library if building with SD support
1771 // PINB.1, 20, SCK
1772 #define SCK_PIN 52
1773 // PINB.3, 22, MISO
1774 #define MISO_PIN 50
1775 // PINB.2, 21, MOSI
1776 #define MOSI_PIN 51
1777 // PINB.0, 19, SS
1778 #define MAX6675_SS 53
1779 
1780 #endif // MOTHERBOARD == 12
1781 
1782 
1783 /****************************************************************************************
1784 * MegaTronics
1785 *
1786 ****************************************************************************************/
1787 #if MOTHERBOARD == 70
1788 #define KNOWN_BOARD 1
1789 
1791 
1792 #ifndef __AVR_ATmega2560__
1793 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
1794 #endif
1795 
1796 #define ORIG_X_STEP_PIN 26
1797 #define ORIG_X_DIR_PIN 28
1798 #define ORIG_X_ENABLE_PIN 24
1799 #define ORIG_X_MIN_PIN 41
1800  //2 //Max endstops default to disabled "-1", set to commented value to enable.
1801 #define ORIG_X_MAX_PIN 37
1802 
1803 #define ORIG_Y_STEP_PIN 60
1804 #define ORIG_Y_DIR_PIN 61
1805 #define ORIG_Y_ENABLE_PIN 22
1806 #define ORIG_Y_MIN_PIN 14
1807 #define ORIG_Y_MAX_PIN 15
1808 
1809 #define ORIG_Z_STEP_PIN 54
1810 #define ORIG_Z_DIR_PIN 55
1811 #define ORIG_Z_ENABLE_PIN 56
1812 #define ORIG_Z_MIN_PIN 18
1813 #define ORIG_Z_MAX_PIN 19
1814 
1815 #define ORIG_E0_STEP_PIN 31
1816 #define ORIG_E0_DIR_PIN 32
1817 #define ORIG_E0_ENABLE_PIN 38
1818 
1819 #define ORIG_E1_STEP_PIN 34
1820 #define ORIG_E1_DIR_PIN 36
1821 #define ORIG_E1_ENABLE_PIN 30
1822 
1823 #define SDPOWER -1
1824 #define SDSS 53
1825 #define LED_PIN 13
1826 
1827 
1828 // IO pin. Buffer needed
1829 #define ORIG_FAN_PIN 7
1830 #define ORIG_PS_ON_PIN 12
1831 
1832 // EXTRUDER 1
1833 #define HEATER_0_PIN 9
1834 // EXTRUDER 2 (FAN On Sprinter)
1835 #define HEATER_1_PIN 8
1836 // Heated bed
1837 #define HEATER_2_PIN 10
1838 
1839 #define THERMOCOUPLE_0_PIN 8
1840 // Thermocouple 0 ANALOG NUMBERING
1841 #define TEMP_3_PIN 8
1842 // ANALOG NUMBERING
1843 #define TEMP_0_PIN 13
1844 // ANALOG NUMBERING
1845 #define TEMP_1_PIN 15
1846 #define TEMP_2_PIN -1 // ANALOG NUMBERING
1847  // BED
1848 #define HEATER_BED_PIN 10
1849 // ANALOG NUMBERING
1850 #define TEMP_BED_PIN 14
1851 
1852 // Beeper on AUX-4
1853 #define BEEPER_PIN 33
1854 #define BEEPER_TYPE 1
1855 #define SDSUPPORT 1 // sd card reader on board
1856 #define ORIG_SDCARDDETECT -1
1857 
1858 
1859 #ifdef ULTRA_LCD
1860 
1861 #ifdef NEWPANEL
1862 #define LCD_PINS_RS 16
1863 #define LCD_PINS_ENABLE 17
1864 #define LCD_PINS_D4 23
1865 #define LCD_PINS_D5 25
1866 #define LCD_PINS_D6 27
1867 #define LCD_PINS_D7 29
1868 
1869 //buttons are directly attached using AUX-2
1870 #define BTN_EN1 37
1871 #define BTN_EN2 35
1872 #define BTN_ENC 43
1873 
1874 #define BLEN_C 2
1875 #define BLEN_B 1
1876 #define BLEN_A 0
1877 
1878 #endif
1879 #endif //ULTRA_LCD
1880 
1881 #define SCK_PIN 52
1882 #define MISO_PIN 50
1883 #define MOSI_PIN 51
1884 
1885 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1886 #define E1_PINS
1887 
1888 #endif
1889 
1890 /****************************************************************************************
1891 * FELIXprinters
1892 *
1893 ****************************************************************************************/
1894 #if MOTHERBOARD == 101
1895 #define KNOWN_BOARD 1
1896 
1897 
1899 #ifndef __AVR_ATmega1280__
1900 #ifndef __AVR_ATmega2560__
1901 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
1902 #endif
1903 #endif
1904 
1905 #define ORIG_X_STEP_PIN 54
1906 #define ORIG_X_DIR_PIN 55
1907 #define ORIG_X_ENABLE_PIN 38
1908 #define ORIG_X_MIN_PIN 3
1909 #define ORIG_X_MAX_PIN -1
1910 
1911 #define ORIG_Y_STEP_PIN 60
1912 #define ORIG_Y_DIR_PIN 61
1913 #define ORIG_Y_ENABLE_PIN 56
1914 #define ORIG_Y_MIN_PIN 14
1915 #define ORIG_Y_MAX_PIN -1
1916 
1917 #define ORIG_Z_STEP_PIN 46
1918 #define ORIG_Z_DIR_PIN 48
1919 #define ORIG_Z_ENABLE_PIN 62
1920 #define ORIG_Z_MIN_PIN 18
1921 #define ORIG_Z_MAX_PIN -1
1922 
1923 #define ORIG_E0_STEP_PIN 26
1924 #define ORIG_E0_DIR_PIN 28
1925 #define ORIG_E0_ENABLE_PIN 24
1926 
1927 #define ORIG_E1_STEP_PIN 36
1928 #define ORIG_E1_DIR_PIN 34
1929 #define ORIG_E1_ENABLE_PIN 30
1930 
1931 
1932 
1933 #define LED_PIN 13
1934 #define ORIG_FAN_PIN 9
1935 #define ORIG_PS_ON_PIN 12
1936 #define KILL_PIN -1
1937 
1938 #define HEATER_0_PIN 10
1939 //BED
1940 #define HEATER_1_PIN 8
1941 #define HEATER_2_PIN 7
1942 
1943 // ANALOG NUMBERING
1944 #define TEMP_0_PIN 13
1945  // BED,ANALOG NUMBERING
1946 #define TEMP_1_PIN 14
1947 #define TEMP_2_PIN 15
1948 
1949 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
1950 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
1951 
1952 #define SDPOWER 1
1953 #define SDSS 53
1954 #define ORIG_SDCARDDETECT 6
1955 #define SDSUPPORT 1 // already defined in config.h
1956 #define SDCARDDETECTINVERTED 1 // already defined in config.h
1957 
1958 // these pins are defined in the SD library if building with SD support
1959 // PINB.1, 20, SCK
1960 #define SCK_PIN 52
1961 // PINB.3, 22, MISO
1962 #define MISO_PIN 50
1963 // PINB.2, 21, MOSI
1964 #define MOSI_PIN 51
1965 //53 // PINB.0, 19, SS
1966 #define MAX6675_SS -1
1967 
1968 #define BEEPER_PIN -1 // Activate beeper on extension shield
1969 #define BEEPER_TYPE 1
1970 
1971 #endif//MOTHERBOARD == 101
1972 
1973 
1974 /****************************************************************************************
1975 * MegaTronics v2.0
1976 *
1977 ****************************************************************************************/
1978 #if MOTHERBOARD == 701
1979 #define KNOWN_BOARD 1
1980 
1981 
1982 #ifndef __AVR_ATmega2560__
1983 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
1984 #endif
1985 
1986 
1987 #define ORIG_X_STEP_PIN 26
1988 #define ORIG_X_DIR_PIN 27
1989 #define ORIG_X_ENABLE_PIN 25
1990 #define ORIG_X_MIN_PIN 37
1991  //2 //Max endstops default to disabled "-1", set to commented value to enable.
1992 #define ORIG_X_MAX_PIN 40
1993 
1994 #define ORIG_Y_STEP_PIN 4
1995 #define ORIG_Y_DIR_PIN 54
1996 #define ORIG_Y_ENABLE_PIN 5
1997 #define ORIG_Y_MIN_PIN 41
1998 #define ORIG_Y_MAX_PIN 38
1999 
2000 #define ORIG_Z_STEP_PIN 56
2001 #define ORIG_Z_DIR_PIN 60
2002 #define ORIG_Z_ENABLE_PIN 55
2003 #define ORIG_Z_MIN_PIN 18
2004 #define ORIG_Z_MAX_PIN 19
2005 
2006 #define ORIG_E0_STEP_PIN 35
2007 #define ORIG_E0_DIR_PIN 36
2008 #define ORIG_E0_ENABLE_PIN 34
2009 
2010 #define ORIG_E1_STEP_PIN 29
2011 #define ORIG_E1_DIR_PIN 39
2012 #define ORIG_E1_ENABLE_PIN 28
2013 
2014 #define ORIG_E2_STEP_PIN 23
2015 #define ORIG_E2_DIR_PIN 24
2016 #define ORIG_E2_ENABLE_PIN 22
2017 
2018 #define ORIG_SDCARDDETECT -1 // Ramps does not use this port
2019 #define SDPOWER -1
2020 #define SDSS 53
2021 
2022 #define LED_PIN 13
2023 
2024 
2025 #define ORIG_FAN_PIN 7
2026 #define ORIG_FAN2_PIN 6
2027 #define ORIG_PS_ON_PIN 12
2028 
2029  // EXTRUDER 1
2030 #define HEATER_0_PIN 9
2031 // Heated bed
2032 #define HEATER_2_PIN 8
2033 // EXTRUDER 2
2034 #define HEATER_1_PIN 10
2035 
2036 // Thermistor 0 ANALOG NUMBERING
2037 #define TEMP_0_PIN 13
2038 // Thermistor 1 ANALOG NUMBERING
2039 #define TEMP_2_PIN 15
2040  // Thermistor 2 for heated bed ANALOG NUMBERING
2041 #define TEMP_1_PIN 14
2042  // Thermocouple 0
2043 #define TEMP_3_PIN 8
2044  // Thermocouple 1
2045 #define TEMP_4_PIN 4
2046 #define THERMOCOUPLE_0_PIN 8
2047 #define THERMOCOUPLE_1_PIN 4
2048 
2049 // Beeper on AUX-4
2050 #define BEEPER_PIN 64
2051 
2052 #define LCD_PINS_RS 14
2053 #define LCD_PINS_ENABLE 15
2054 #define LCD_PINS_D4 30
2055 #define LCD_PINS_D5 31
2056 #define LCD_PINS_D6 32
2057 #define LCD_PINS_D7 33
2058 
2059 
2060 //buttons are directly attached using AUX-2
2061 #define BTN_EN1 59
2062 #define BTN_EN2 64
2063 #define BTN_ENC 43
2064 
2065 #define BLEN_C 2
2066 #define BLEN_B 1
2067 #define BLEN_A 0
2068 
2069 #define SCK_PIN 52
2070 #define MISO_PIN 50
2071 #define MOSI_PIN 51
2072 
2073 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2074 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2075 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
2076 
2077 #endif
2078 
2079 /****************************************************************************************
2080 * Minitronics v1.0
2081 *
2082 ****************************************************************************************/
2083 #if MOTHERBOARD == 702
2084 #define KNOWN_BOARD 1
2085 
2086 
2087 #ifndef __AVR_ATmega1281__
2088 #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
2089 #endif
2090 
2091 #define LARGE_FLASH true
2092 
2093 #define ORIG_X_STEP_PIN 48
2094 #define ORIG_X_DIR_PIN 47
2095 #define ORIG_X_ENABLE_PIN 49
2096 #define ORIG_X_MIN_PIN 5
2097 //2 //Max endstops default to disabled "-1", set to commented value to enable.
2098 #define ORIG_X_MAX_PIN -1
2099 
2100 #define ORIG_Y_STEP_PIN 39
2101 #define ORIG_Y_DIR_PIN 40
2102 #define ORIG_Y_ENABLE_PIN 38
2103 #define ORIG_Y_MIN_PIN 2
2104 #define ORIG_Y_MAX_PIN -1
2105 
2106 #define ORIG_Z_STEP_PIN 42
2107 #define ORIG_Z_DIR_PIN 43
2108 #define ORIG_Z_ENABLE_PIN 41
2109 #define ORIG_Z_MIN_PIN 6
2110 #define ORIG_Z_MAX_PIN -1
2111 
2112 #define ORIG_E0_STEP_PIN 45
2113 #define ORIG_E0_DIR_PIN 44
2114 #define ORIG_E0_ENABLE_PIN 27
2115 
2116 #define ORIG_E1_STEP_PIN 36
2117 #define ORIG_E1_DIR_PIN 35
2118 #define ORIG_E1_ENABLE_PIN 37
2119 
2120 #define ORIG_E2_STEP_PIN -1
2121 #define ORIG_E2_DIR_PIN -1
2122 #define ORIG_E2_ENABLE_PIN -1
2123 
2124 #define SDPOWER -1
2125 #define SDSS 16
2126 #define SCK_PIN 10
2127 #define MISO_PIN 12
2128 #define MOSI_PIN 11
2129 #define LED_PIN 46
2130 
2131 #define ORIG_FAN_PIN 9
2132 #define ORIG_FAN2_PIN -1
2133 #define ORIG_PS_ON_PIN -1
2134 #define KILL_PIN -1
2135 
2136 // EXTRUDER 1
2137 #define HEATER_0_PIN 7
2138 // BED
2139 #define HEATER_1_PIN 3
2140 // EXTRUDER 2
2141 #define HEATER_2_PIN 8
2142 #define HEATER_3_PIN -1
2143 
2144 
2145 // ANALOG NUMBERING
2146 #define TEMP_0_PIN 7
2147 // BED SENSOR ANALOG NUMBERING
2148 #define TEMP_1_PIN 6
2149 // ANALOG NUMBERING
2150 #define TEMP_2_PIN 6
2151 // ANALOG NUMBERING
2152 #define TEMP_3_PIN -1
2153 
2154 
2155 #define BEEPER_PIN -1
2156 
2157 #define ORIG_SDCARDDETECT -1 // Megatronics does not use this port
2158 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2159 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2160 #define E2_PINS
2161 
2162 #endif
2163 
2164 
2165 /****************************************************************************************
2166 * MegaTronics v3.0
2167 *
2168 ****************************************************************************************/
2169 #if MOTHERBOARD == 703
2170 #define KNOWN_BOARD 1
2171 
2172 
2173 #ifndef __AVR_ATmega2560__
2174 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
2175 #endif
2176 
2177 
2178 #define ORIG_X_STEP_PIN 58
2179 #define ORIG_X_DIR_PIN 57
2180 #define ORIG_X_ENABLE_PIN 59
2181 #define ORIG_X_MIN_PIN 37
2182 //2 //Max endstops default to disabled "-1", set to commented value to enable.
2183 #define ORIG_X_MAX_PIN 40
2184 
2185 #define ORIG_Y_STEP_PIN 5
2186 #define ORIG_Y_DIR_PIN 17
2187 #define ORIG_Y_ENABLE_PIN 4
2188 #define ORIG_Y_MIN_PIN 41
2189 #define ORIG_Y_MAX_PIN 38
2190 
2191 #define ORIG_Z_STEP_PIN 16
2192 #define ORIG_Z_DIR_PIN 11
2193 #define ORIG_Z_ENABLE_PIN 3
2194 #define ORIG_Z_MIN_PIN 18
2195 #define ORIG_Z_MAX_PIN 19
2196 
2197 #define ORIG_E0_STEP_PIN 28
2198 #define ORIG_E0_DIR_PIN 27
2199 #define ORIG_E0_ENABLE_PIN 29
2200 
2201 #define ORIG_E1_STEP_PIN 25
2202 #define ORIG_E1_DIR_PIN 24
2203 #define ORIG_E1_ENABLE_PIN 26
2204 
2205 #define ORIG_E2_STEP_PIN 22
2206 #define ORIG_E2_DIR_PIN 60
2207 #define ORIG_E2_ENABLE_PIN 23
2208 
2209 #define ORIG_SDCARDDETECT -1 // Ramps does not use this port
2210 #define SDPOWER -1
2211 #define SDSS 53
2212 
2213 #define LED_PIN 13
2214 
2215 #define ORIG_FAN_PIN 6
2216 #define ORIG_FAN2_PIN 7
2217 
2218 #define ORIG_PS_ON_PIN 12
2219 //#define KILL_PIN -1
2220 
2221 // EXTRUDER 0 - changed 10-9-2015
2222 #define HEATER_0_PIN 2
2223 // EXTRUDER 1 - changed 10-9-2015
2224 #define HEATER_2_PIN 9
2225 // EXTRUDER 2 - changed 10-9-2015
2226 #define HEATER_3_PIN 8
2227 // heater bed
2228 #define HEATER_1_PIN 10
2229 
2230 /*
2231 Temperature sensors
2232 ANALOG NUMBERING!
2233 
2234 Thermistors
2235 T0=15
2236 T1=14
2237 T2=13
2238 T3=12
2239 
2240 Thermocouple
2241 S0=11
2242 S1=10
2243 S2(ext)=8
2244 S3(ext)=9
2245 */
2246 
2247 // Extruder 1 - Thermistor 1
2248 #define TEMP_0_PIN 15
2249 // Extruder 2 - Thermistor 2
2250 #define TEMP_2_PIN 14
2251 // Extruder 3 - Thermistor 3
2252 #define TEMP_3_PIN 13
2253 // Heated bed - Thermistor 4
2254 #define TEMP_1_PIN 12
2255 
2256 #define THERMOCOUPLE_0_PIN 11
2257 #define THERMOCOUPLE_1_PIN 10
2258 #define THERMOCOUPLE_2_PIN 8
2259 #define THERMOCOUPLE_3_PIN 9
2260 
2261 // Beeper on AUX-4
2262 #define BEEPER_PIN 61
2263 #define SDSUPPORT 1 // sd card reader on board
2264 
2265 // #define UI_DISPLAY_RS_PIN 32
2266 // #define UI_DISPLAY_ENABLE_PIN 31
2267 // #define UI_DISPLAY_D4_PIN 14
2268 // #define UI_DISPLAY_D5_PIN 30
2269 // #define UI_DISPLAY_D6_PIN 39
2270 // #define UI_DISPLAY_D7_PIN 15
2271 
2272 
2273 //buttons are directly attached using AUX-2
2277 
2278 #define SCK_PIN 52
2279 #define MISO_PIN 50
2280 #define MOSI_PIN 51
2281 
2282 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2283 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2284 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
2285 
2286 
2287 #endif
2288 
2289 
2290 #if MOTHERBOARD == 301
2291 #define KNOWN_BOARD
2292 /*****************************************************************
2293 * RAMBo Pin Assignments
2294 ******************************************************************/
2295 
2296 #ifndef __AVR_ATmega2560__
2297 #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
2298 #endif
2299 
2300 #define ORIG_X_STEP_PIN 37
2301 #define ORIG_X_DIR_PIN 48
2302 #define ORIG_X_MIN_PIN 12
2303 #define ORIG_X_MAX_PIN 24
2304 #define ORIG_X_ENABLE_PIN 29
2305 #define X_MS1_PIN 40
2306 #define X_MS2_PIN 41
2307 
2308 #define ORIG_Y_STEP_PIN 36
2309 #define ORIG_Y_DIR_PIN 49
2310 #define ORIG_Y_MIN_PIN 11
2311 #define ORIG_Y_MAX_PIN 23
2312 #define ORIG_Y_ENABLE_PIN 28
2313 #define Y_MS1_PIN 69
2314 #define Y_MS2_PIN 39
2315 
2316 #define ORIG_Z_STEP_PIN 35
2317 #define ORIG_Z_DIR_PIN 47
2318 #define ORIG_Z_MIN_PIN 10
2319 #define ORIG_Z_MAX_PIN 30
2320 #define ORIG_Z_ENABLE_PIN 27
2321 #define Z_MS1_PIN 68
2322 #define Z_MS2_PIN 67
2323 
2324 #define HEATER_0_PIN 9
2325 #define TEMP_0_PIN 0
2326 
2327 #define HEATER_1_PIN 3
2328 // This is T2 on the board!
2329 #define TEMP_1_PIN 2
2330 
2331 #define HEATER_2_PIN 7
2332 // This is T1 on the board!
2333 #define TEMP_2_PIN 1
2334 // T3 on board
2335 #define TEMP_3_PIN 7
2336 
2337 #define ORIG_E0_STEP_PIN 34
2338 #define ORIG_E0_DIR_PIN 43
2339 #define ORIG_E0_ENABLE_PIN 26
2340 #define E0_MS1_PIN 65
2341 #define E0_MS2_PIN 66
2342 
2343 #define ORIG_E1_STEP_PIN 33
2344 #define ORIG_E1_DIR_PIN 42
2345 #define ORIG_E1_ENABLE_PIN 25
2346 #define E1_MS1_PIN 63
2347 #define E1_MS2_PIN 64
2348 
2349 #define DIGIPOTSS_PIN 38
2350 #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
2351 
2352 #define SDPOWER -1
2353 #define SDSS 53
2354 #define LED_PIN 13
2355 #define ORIG_FAN_PIN 8
2356 #define ORIG_FAN2_PIN 6
2357 #define ORIG_FAN3_PIN 2
2358 #define ORIG_PS_ON_PIN 4
2359 #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
2360 
2361 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,E0_MS1_PIN,E0_MS2_PIN,
2362 #define E1_PINS
2363 
2364 #define SCK_PIN 52
2365 #define MISO_PIN 50
2366 #define MOSI_PIN 51
2367 #define MAX6675_SS 53
2368 #define STEPPER_CURRENT_CONTROL CURRENT_CONTROL_DIGIPOT
2369 
2370 #endif
2371 
2372 
2373 /***************************************************************************************
2374 *PiBot for Repetier pins assignment
2375 *illustration :
2376 * PiBot for Repetier V1.0-1.3 =314
2377 * PiBot for Repetier V1.4-1.6 =315
2378 * PiBot Controller Rev2.0 =316
2379 ***************************************************************************************/
2380 
2381 #if MOTHERBOARD == 316
2382 #define MOTHERBOARD 314
2383 #define PiBot_V_2_0 true
2384 #define PiBot_HD_VERSION "Rev2.0"
2385 #ifndef Thermistor_Solution
2386 #define Thermistor_Solution 0
2387 #endif
2388 // define for temperature senser chip connection
2389 // temperature sensor port in Rev 2.0 for max6675
2390 // #define MAX6675_TEMP_Senser false ///*** canceled hardware integration
2391 // Temperature sensor port in Rev 2.0 for AD595
2392 #define AD595_TEMP_Senser false
2393 #endif
2394 
2395 #if MOTHERBOARD == 315
2396 #define MOTHERBOARD 314
2397 #define PiBot_V_1_6 true
2398 #define PiBot_HD_VERSION "Rev1.6"
2399 #endif
2400 
2401 #if MOTHERBOARD == 314
2402 #define KNOWN_BOARD 1
2403 #define PiBot true
2404 
2405 #if PiBot_V_1_4==true || PiBot_V_1_6==true || PiBot_V_2_0==true
2406 #define PiBot_V_1_0 false
2407 #else
2408 #define PiBot_V_1_0 true
2409 #define PiBot_HD_VERSION "Rev1.0"
2410 #endif
2411 
2412 #ifndef PiBotSemitec
2413 #define PiBotSemitec false // for semitec NTC 100K b=4230(test value) default b=4267
2414 #endif
2415 
2416 #ifndef PI_PRUSA_I3
2417 #define PI_PRUSA_I3 false
2418 #endif
2419 
2420 #ifndef PiBotMachine
2421 #define PiBotMachine false // if use for pibot 3D printer uncomment this line.
2422 #endif
2423 
2424 #if PI_PRUSA_I3==true
2425 #define PiBotMachine true // if use for pibot 3D printer uncomment this line.
2426 #endif
2427 
2428 // define in AVR public files, when you finish the chip select.
2429 #ifndef __AVR_ATmega1280__
2430 #ifndef __AVR_ATmega2560__
2431 #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
2432 #endif
2433 #endif
2434 
2435 #if PiBot_V_1_0
2436 #define ORIG_X_STEP_PIN 54
2437 #define ORIG_X_DIR_PIN 55
2438 #define ORIG_X_ENABLE_PIN 38
2439 #define ORIG_X_MIN_PIN 3
2440 #define ORIG_X_MAX_PIN 2
2441 
2442 #define ORIG_Y_STEP_PIN 60
2443 #define ORIG_Y_DIR_PIN 61
2444 #define ORIG_Y_ENABLE_PIN 56
2445 #define ORIG_Y_MIN_PIN 14
2446 #define ORIG_Y_MAX_PIN 15
2447 
2448 #define ORIG_Z_STEP_PIN 46
2449 #define ORIG_Z_DIR_PIN 48
2450 #define ORIG_Z_ENABLE_PIN 62
2451 #define ORIG_Z_MIN_PIN 18
2452 #define ORIG_Z_MAX_PIN 19
2453 
2454 #define ORIG_E0_STEP_PIN 26
2455 #define ORIG_E0_DIR_PIN 28
2456 #define ORIG_E0_ENABLE_PIN 24
2457 
2458 #define ORIG_E1_STEP_PIN 36
2459 #define ORIG_E1_DIR_PIN 34
2460 #define ORIG_E1_ENABLE_PIN 30
2461 
2462 #define SDPOWER -1
2463 #define ORIG_SDCARDDETECT 49
2464 
2465 #define LED_PIN 13
2466 #define ORIG_FAN_PIN 7
2467 #define ORIG_PS_ON_PIN 12
2468 #define KILL_PIN -1
2469 
2470 // Extuder1
2471 #define HEATER_0_PIN 8
2472 // Bed
2473 #define HEATER_1_PIN 10
2474 // Extuder2
2475 #define HEATER_2_PIN 9
2476 // ANALOG NUMBERING Extuder1
2477 #define TEMP_0_PIN 13
2478 // ANALOG NUMBERING Bed
2479 #define TEMP_1_PIN 15
2480 // ANALOG NUMBERING Extuder2
2481 #define TEMP_2_PIN 14
2482 
2483 // ISP for TFcard
2484 #define SDSS 53
2485 #define SCK_PIN 52
2486 #define MISO_PIN 50
2487 #define MOSI_PIN 51
2488 
2489 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2490 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2491 #endif // end PiBot for Repetier V1.0
2492 
2493 
2494 #if PiBot_V_1_4==true || PiBot_V_1_6==true
2495 #define ORIG_X_STEP_PIN 4
2496 #define ORIG_X_DIR_PIN 17
2497 #define ORIG_X_ENABLE_PIN 16
2498 #define ORIG_X_MIN_PIN 37
2499 #define ORIG_X_MAX_PIN 34
2500 
2501 #define ORIG_Y_STEP_PIN 56
2502 #define ORIG_Y_DIR_PIN 55
2503 #define ORIG_Y_ENABLE_PIN 54
2504 #define ORIG_Y_MIN_PIN 36
2505 #define ORIG_Y_MAX_PIN 33
2506 
2507 #define ORIG_Z_STEP_PIN 59
2508 #define ORIG_Z_DIR_PIN 58
2509 #define ORIG_Z_ENABLE_PIN 57
2510 #define ORIG_Z_MIN_PIN 35
2511 #define ORIG_Z_MAX_PIN 32
2512 
2513 #define ORIG_E0_STEP_PIN 24
2514 #define ORIG_E0_DIR_PIN 23
2515 #define ORIG_E0_ENABLE_PIN 22
2516 
2517 #define ORIG_E1_STEP_PIN 27
2518 #define ORIG_E1_DIR_PIN 26
2519 #define ORIG_E1_ENABLE_PIN 25
2520 
2521 //uncomment when use 3rd extruder
2522 #define ORIG_E2_STEP_PIN 15
2523 #define ORIG_E2_DIR_PIN 14
2524 #define ORIG_E2_ENABLE_PIN 39
2525 
2526 //uncomment when use 4th extruder
2527 #define ORIG_E3_STEP_PIN 41
2528 #define ORIG_E3_DIR_PIN 38
2529 #define ORIG_E3_ENABLE_PIN 13
2530 
2531 #define SDPOWER -1
2532 #define ORIG_SDCARDDETECT 10
2533 
2534 #define LED_PIN 30
2535 #define ORIG_FAN_PIN 7
2536 //uncomment when the 2nd fan used - works only without heated bed!
2537 #define ORIG_FAN2_PIN 2
2538 #define PS_ON_PIN 40
2539 #define KILL_PIN -1
2540 
2541 // Extuder1
2542 #define HEATER_0_PIN 3
2543 // Bed
2544 #define HEATER_1_PIN 12
2545 // Extuder2
2546 #define HEATER_2_PIN 6
2547  // Extuder3
2548 #define HEATER_3_PIN 9
2549 // Extuder4
2550 #define HEATER_4_PIN 11
2551 
2552 // ANALOG NUMBERING Extuder1
2553 #define TEMP_0_PIN 14
2554 // ANALOG NUMBERING Bed
2555 #define TEMP_1_PIN 15
2556 // ANALOG NUMBERING Extuder2
2557 #define TEMP_2_PIN 13
2558 // ANALOG NUMBERING Extuder3
2559 #define TEMP_3_PIN 12
2560 // ANALOG NUMBERING Extuder4
2561 #define TEMP_4_PIN 11
2562 
2563 //PiBot use this pin as Z-Probing pin
2564 #define PiBot_Z_PROBE_PIN 64
2565 
2566 // ISP for TFcard
2567 #define SDSS 53
2568 #define SCK_PIN 52
2569 #define MISO_PIN 50
2570 #define MOSI_PIN 51
2571 
2572 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2573 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2574 #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
2575 #define E3_PINS ORIG_E3_STEP_PIN,ORIG_E3_DIR_PIN,ORIG_E3_ENABLE_PIN,
2576 
2577 #endif // end PiBot for Repetier V1.4 or V1.6
2578 
2579 
2580 #if PiBot_V_2_0==true
2581 #define ORIG_X_STEP_PIN 24
2582 #define ORIG_X_DIR_PIN 23
2583 #define ORIG_X_ENABLE_PIN 22
2584 #define ORIG_X_MIN_PIN 62
2585 #define ORIG_X_MAX_PIN 63
2586 
2587 #define ORIG_Y_STEP_PIN 27
2588 #define ORIG_Y_DIR_PIN 26
2589 #define ORIG_Y_ENABLE_PIN 25
2590 #define ORIG_Y_MIN_PIN 64
2591 #define ORIG_Y_MAX_PIN 65
2592 
2593 #define ORIG_Z_STEP_PIN 15
2594 #define ORIG_Z_DIR_PIN 14
2595 #define ORIG_Z_ENABLE_PIN 39
2596 #define ORIG_Z_MIN_PIN 66
2597 #define ORIG_Z_MAX_PIN 67
2598 
2599 #define ORIG_E0_STEP_PIN 32
2600 #define ORIG_E0_DIR_PIN 31
2601 #define ORIG_E0_ENABLE_PIN 30
2602 
2603 #define ORIG_E1_STEP_PIN 35
2604 #define ORIG_E1_DIR_PIN 34
2605 #define ORIG_E1_ENABLE_PIN 33
2606 
2607 // =========================================
2608 #define PiBot_Z_PROBE_PIN 68 // PiBot use this pin as Z-Probing pin
2609 
2610 #define LED_PIN -1
2611 
2612 // PWM6 fan1
2613 #define ORIG_FAN_PIN 6
2614  // PWM7 fan2
2615 #define ORIG_FAN2_PIN 7
2616 
2617 // have hardware in PiBot HDV2.0
2618 #define ORIG_PS_ON_PIN 17
2619 #define KILL_PIN -1
2620 
2621 // PWM5 Extuder1
2622 #define HEATER_0_PIN 5
2623 // PWM4 Bed
2624 #define HEATER_1_PIN 4
2625 // PWM2 Extuder2
2626 #define HEATER_2_PIN 2
2627 // for Pibot PWM Extuder3
2628 #define HEATER_3_PIN -1
2629 // for Pibot PWM Extuder4
2630 #define HEATER_4_PIN -1
2631 
2632 #if Thermistor_Solution==0 // 000 0 2 4
2633 // ANALOG NUMBERING Extuder1
2634 #define TEMP_0_PIN 2
2635 // ANALOG NUMBERING Bed
2636 #define TEMP_1_PIN 0
2637 // ANALOG NUMBERING Extuder2
2638 #define TEMP_2_PIN 4
2639 #endif
2640 #if Thermistor_Solution==1 // 001 1 2 4
2641 // ANALOG NUMBERING Extuder1
2642 #define TEMP_0_PIN 2
2643 // ANALOG NUMBERING Bed
2644 #define TEMP_1_PIN 1
2645 // ANALOG NUMBERING Extuder2
2646 #define TEMP_2_PIN 4
2647 #endif
2648 #if Thermistor_Solution==2 // 010 0 3 4
2649 #define TEMP_0_PIN 3
2650 // ANALOG NUMBERING Bed
2651 #define TEMP_1_PIN 0
2652 // ANALOG NUMBERING Extuder2
2653 #define TEMP_2_PIN 4
2654 #endif
2655 #if Thermistor_Solution==3 // 011 1 3 4
2656 // ANALOG NUMBERING Extuder1
2657 #define TEMP_0_PIN 3
2658 #define TEMP_1_PIN 1
2659 // ANALOG NUMBERING Extuder2
2660 #define TEMP_2_PIN 4
2661 #endif
2662 #if Thermistor_Solution==4 // 100 0 2 5
2663 // ANALOG NUMBERING Extuder1
2664 #define TEMP_0_PIN 2
2665 // ANALOG NUMBERING Bed
2666 #define TEMP_1_PIN 0
2667 // ANALOG NUMBERING Extuder2
2668 #define TEMP_2_PIN 5
2669 #endif
2670 #if Thermistor_Solution==5 // 101 1 2 5
2671 // ANALOG NUMBERING Extuder1
2672 #define TEMP_0_PIN 2
2673 // ANALOG NUMBERING Bed
2674 #define TEMP_1_PIN 1
2675 // ANALOG NUMBERING Extuder2
2676 #define TEMP_2_PIN 5
2677 #endif
2678 #if Thermistor_Solution==6 // 110 0 3 5
2679 // ANALOG NUMBERING Extuder1
2680 #define TEMP_0_PIN 3
2681 // ANALOG NUMBERING Bed
2682 #define TEMP_1_PIN 0
2683 // ANALOG NUMBERING Extuder2
2684 #define TEMP_2_PIN 5
2685 #endif
2686 #if Thermistor_Solution==7 // 111 1 3 5
2687 // ANALOG NUMBERING Extuder1
2688 #define TEMP_0_PIN 3
2689 // ANALOG NUMBERING Bed
2690 #define TEMP_1_PIN 1
2691 // ANALOG NUMBERING Extuder2
2692 #define TEMP_2_PIN 5
2693 #endif
2694 #if !defined(TEMP_0_PIN) || !defined(TEMP_1_PIN) || !defined(TEMP_2_PIN) ||!defined(Thermistor_Solution)
2695 // ANALOG NUMBERING Extuder1
2696 #define TEMP_0_PIN 2
2697 // ANALOG NUMBERING Bed
2698 #define TEMP_1_PIN 0
2699 // ANALOG NUMBERING Extuder2
2700 #define TEMP_2_PIN 4
2701 #endif
2702 
2703 // ad595 temp senser
2704 #if AD595_TEMP_Senser==true
2705 // ANALOG NUMBERING Extuder1
2706 #define TEMP_0_PIN 8
2707 // ANALOG NUMBERING Bed
2708 #define TEMP_1_PIN 9
2709 // ANALOG NUMBERING Extuder2
2710 #define TEMP_2_PIN 10
2711 #endif
2712 
2713 // max6675 ISP port temp->ISP-ENABLE
2714 // these enable pins have been isolated by capacitor
2715 /*#if MAX6675_TEMP_Senser==true
2716 // ANALOG NUMBERING Extuder1
2717 #define TEMP_0_PIN 14 // ANALOG NUMBERING Extuder1
2718 #define TEMP_1_PIN 15 // ANALOG NUMBERING Bed
2719 #define TEMP_2_PIN 13 // ANALOG NUMBERING Extuder2
2720 //uncomment when 3 extruder used
2721 #define TEMP_3_PIN 12 // ANALOG NUMBERING Extuder3
2722 #endif*/
2723 
2724 // ISP for TFcard
2725 #define SDPOWER -1
2726 #define ORIG_SDCARDDETECT 40
2727 #define SDSS 53
2728 #define SCK_PIN 52
2729 #define MISO_PIN 50
2730 #define MOSI_PIN 51
2731 
2732 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2733 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2734 
2735 #endif // end PiBot Controller Rev 2.0
2736 
2737 #endif // end PiBot for Repetier
2738 
2739 /****************************************************************************************
2740 * Sanguish Beta pin assignment
2741 *
2742 ****************************************************************************************/
2743 #if MOTHERBOARD == 501
2744 #define KNOWN_BOARD
2745 
2746 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
2747 #error Oops! Make sure you have 'Your MCU/Bootloader' selected from the 'Tools -> Boards' menu.
2748 #endif
2749 
2750 //x axis pins
2751 #define ORIG_X_STEP_PIN 28
2752 #define ORIG_X_DIR_PIN 27
2753 #define ORIG_X_ENABLE_PIN 29
2754 #define ORIG_X_MIN_PIN 2
2755 #define ORIG_X_MAX_PIN -1
2756 
2757 //y axis pins
2758 #define ORIG_Y_STEP_PIN 25
2759 #define ORIG_Y_DIR_PIN 24
2760 #define ORIG_Y_ENABLE_PIN 26
2761 #define ORIG_Y_MIN_PIN 5
2762 #define ORIG_Y_MAX_PIN -1
2763 
2764 //z axis pins
2765 #define ORIG_Z_STEP_PIN 22
2766 #define ORIG_Z_DIR_PIN 21
2767 #define ORIG_Z_ENABLE_PIN 23
2768 #define ORIG_Z_MIN_PIN 1
2769 #define ORIG_Z_MAX_PIN -1
2770 
2771 //extruder pins
2772 #define ORIG_E0_STEP_PIN 19
2773 #define ORIG_E0_DIR_PIN 18
2774 #define ORIG_E0_ENABLE_PIN 20
2775 #define TEMP_0_PIN 1
2776 #define TEMP_1_PIN 0
2777 #define HEATER_0_PIN 3
2778 #define HEATER_1_PIN 4
2779 
2780 
2781 #define SDPOWER -1
2782 #define SDSS -1
2783 #define LED_PIN -1
2784 
2785 #define ORIG_FAN_PIN -1
2786 #define ORIG_PS_ON_PIN 0
2787 //our pin for debugging.
2788 
2789 #define DEBUG_PIN -1
2790 
2791 //our RS485 pins
2792 #define TX_ENABLE_PIN 12
2793 #define RX_ENABLE_PIN 13
2794 
2795 #define SDPOWER -1
2796 #define SDSS -1
2797 
2798 #define SCK_PIN 7
2799 #define MISO_PIN 6
2800 #define MOSI_PIN 5
2801 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2802 #define E1_PINS
2803 #endif
2804 
2805 /****************************************************************************************
2806  * SAV MK1 (ATMEGA90USB)
2807  * Requires the Teensyduino software!
2808  * See how to install software etc. here: http://reprap.org/wiki/SAV_MKI#Setting-up_the_environment
2809  ****************************************************************************************/
2810  #if MOTHERBOARD == 89
2811  #define KNOWN_BOARD 1
2812 
2813  #define ORIG_X_STEP_PIN 28
2814  #define ORIG_X_DIR_PIN 29
2815  #define ORIG_X_ENABLE_PIN 19
2816  #define ORIG_X_MIN_PIN 25
2817  #define ORIG_X_MAX_PIN -1
2818 
2819  #define ORIG_Y_STEP_PIN 30
2820  #define ORIG_Y_DIR_PIN 31
2821  #define ORIG_Y_ENABLE_PIN 18
2822  #define ORIG_Y_MIN_PIN 26
2823  #define ORIG_Y_MAX_PIN -1
2824 
2825  #define ORIG_Z_STEP_PIN 32
2826  #define ORIG_Z_DIR_PIN 33
2827  #define ORIG_Z_ENABLE_PIN 17
2828  #define ORIG_Z_MIN_PIN -1
2829  #define ORIG_Z_MAX_PIN 27
2830 
2831  #define ORIG_E0_STEP_PIN 34
2832  #define ORIG_E0_DIR_PIN 35
2833  #define ORIG_E0_ENABLE_PIN 13
2834 
2835  // Extruder - ANALOG PIN NUMBER!
2836  #define TEMP_0_PIN 7
2837  // Bed - ANALOG PIN NUMBER!
2838  #define TEMP_1_PIN 6
2839  // Extruder
2840  #define HEATER_0_PIN 15
2841  // bed
2842  #define HEATER_1_PIN 14
2843  #define HEATER_2_PIN -1
2844  #define TEMP_2_PIN -1
2845 
2846  #define SDPOWER -1
2847  #define SDSS 20
2848  #define LED_PIN -1
2849  // Fan
2850  #define ORIG_FAN_PIN 16
2851  #define ORIG_PS_ON_PIN -1
2852 
2853  #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2854  #define E1_PINS
2855 
2856  #if !SDSUPPORT
2857  // these pins are defined in the SD library if building with SD support
2858  #define SCK_PIN 21
2859  #define MISO_PIN 23
2860  #define MOSI_PIN 22
2861  #endif
2862 
2863  #endif
2864 
2865 /****************************************************************************************
2866 * MJRice Pica Rev B *
2867 ****************************************************************************************/
2868 #if MOTHERBOARD == 183
2869 #define KNOWN_BOARD 1
2870 
2871 #define ORIG_X_DIR_PIN 54
2872 #define ORIG_X_STEP_PIN 55
2873 #define ORIG_Y_DIR_PIN 56
2874 #define ORIG_Y_STEP_PIN 57
2875 #define ORIG_Z_DIR_PIN 58
2876 #define ORIG_Z_STEP_PIN 59
2877 #define ORIG_X_ENABLE_PIN 60
2878 #define ORIG_Y_ENABLE_PIN 61
2879 #define ORIG_Z_ENABLE_PIN 62
2880 #define ORIG_X_MIN_PIN 14
2881 #define ORIG_X_MAX_PIN 15
2882 #define ORIG_Y_MIN_PIN 16
2883 #define ORIG_Y_MAX_PIN 17
2884 #define ORIG_Z_MIN_PIN 23
2885 #define ORIG_Z_MAX_PIN 22
2886 
2887 #define ORIG_E0_STEP_PIN 67
2888 #define ORIG_E0_DIR_PIN 24
2889 #define ORIG_E0_ENABLE_PIN 26
2890 
2891 #define ORIG_E1_STEP_PIN 68
2892 #define ORIG_E1_DIR_PIN 28
2893 #define ORIG_E1_ENABLE_PIN 27
2894 
2895 #define SSR_PIN 6
2896 
2897 #define SDPOWER -1
2898 #define SDSS 53
2899 #define ORIG_SDCARDDETECT 49
2900 
2901 #define LED_PIN -1
2902 #define ORIG_FAN_PIN 11
2903 #define ORIG_FAN2_PIN 12
2904 #define ORIG_PS_ON_PIN -1
2905 
2906 #define HEATER_0_PIN 10
2907 #define HEATER_1_PIN 8
2908 #define HEATER_2_PIN 2
2909 // ANALOG NUMBERING
2910 #define TEMP_0_PIN 9
2911 
2912 #define TEMP_1_PIN 10
2913 #define TEMP_2_PIN 11
2914 #define TEMP_3_PIN 12
2915 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2916 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2917 
2918 // LCD interface pins
2919 #define LCD_PINS_RS 33
2920 #define LCD_PINS_ENABLE 30
2921 #define LCD_PINS_D4 35
2922 #define LCD_PINS_D5 32
2923 #define LCD_PINS_D6 37
2924 #define LCD_PINS_D7 36
2925 #define BTN_EN1 47
2926 #define BTN_EN2 48
2927 #define BTN_ENC 31 //the click
2928 #define BLEN_C 2
2929 #define BLEN_B 1
2930 #define BLEN_A 0
2931 
2932 #endif
2933 
2934 /****************************************************************************************
2935 * MJRice Pica Rev C *
2936 ****************************************************************************************/
2937 #if MOTHERBOARD == 184
2938 #define KNOWN_BOARD 1
2939 
2940 #define ORIG_X_DIR_PIN 54
2941 #define ORIG_X_STEP_PIN 55
2942 #define ORIG_Y_DIR_PIN 56
2943 #define ORIG_Y_STEP_PIN 57
2944 #define ORIG_Z_DIR_PIN 58
2945 #define ORIG_Z_STEP_PIN 59
2946 #define ORIG_X_ENABLE_PIN 60
2947 #define ORIG_Y_ENABLE_PIN 61
2948 #define ORIG_Z_ENABLE_PIN 62
2949 #define ORIG_X_MIN_PIN 14
2950 #define ORIG_X_MAX_PIN 15
2951 #define ORIG_Y_MIN_PIN 16
2952 #define ORIG_Y_MAX_PIN 17
2953 #define ORIG_Z_MIN_PIN 23
2954 #define ORIG_Z_MAX_PIN 22
2955 
2956 #define ORIG_E0_STEP_PIN 67
2957 #define ORIG_E0_DIR_PIN 24
2958 #define ORIG_E0_ENABLE_PIN 26
2959 
2960 #define ORIG_E1_STEP_PIN 68
2961 #define ORIG_E1_DIR_PIN 28
2962 #define ORIG_E1_ENABLE_PIN 27
2963 
2964 #define SSR_PIN 6
2965 
2966 #define SDPOWER -1
2967 #define SDSS 53
2968 #define ORIG_SDCARDDETECT 49
2969 
2970 #define LED_PIN -1
2971 #define ORIG_FAN_PIN 9
2972 #define ORIG_FAN2_PIN 7
2973 #define ORIG_PS_ON_PIN -1
2974 
2975 #define HEATER_0_PIN 10
2976 #define HEATER_1_PIN 8
2977 #define HEATER_2_PIN 2
2978 // ANALOG NUMBERING
2979 #define TEMP_0_PIN 9
2980 
2981 #define TEMP_1_PIN 10
2982 #define TEMP_2_PIN 11
2983 #define TEMP_3_PIN 12
2984 #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
2985 #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
2986 
2987 // LCD interface pins
2988 #define LCD_PINS_RS 33
2989 #define LCD_PINS_ENABLE 30
2990 #define LCD_PINS_D4 35
2991 #define LCD_PINS_D5 32
2992 #define LCD_PINS_D6 37
2993 #define LCD_PINS_D7 36
2994 #define BTN_EN1 47
2995 #define BTN_EN2 48
2996 #define BTN_ENC 31
2997 #define BLEN_C 2
2998 #define BLEN_B 1
2999 #define BLEN_A 0
3000 
3001 // these pins are defined in the SD library if building with SD support
3002 #define SCK_PIN 52
3003 #define MISO_PIN 50
3004 #define MOSI_PIN 51
3005 #define MAX6675_SS 53
3006 
3007 #endif
3008 
3009 
3010 #if MOTHERBOARD == 999
3011 #define KNOWN_BOARD
3012 #include "userpins.h"
3013 #endif
3014 
3015 
3016 
3017 #ifndef CPU_ARCH // Set default architecture
3018 #define CPU_ARCH ARCH_AVR
3019 #endif
3020 
3021 #ifndef SDSSORIG
3022 #define SDSSORIG -1
3023 #endif
3024 
3025 #ifndef STEPPER_CURRENT_CONTROL // Set default stepper current control if not set yet.
3026 #define STEPPER_CURRENT_CONTROL CURRENT_CONTROL_MANUAL
3027 #endif
3028 
3029 #ifndef FAN_BOARD_PIN
3030 #define FAN_BOARD_PIN -1
3031 #endif
3032 
3033 #ifndef E2_PINS
3034 #define E2_PINS
3035 #endif
3036 
3037 #if NUM_EXTRUDER==1
3038 #undef E1_PINS
3039 #define E1_PINS
3040 #endif
3041 
3042 #if NUM_EXTRUDER < 3
3043 #undef E2_PINS
3044 #define E2_PINS
3045 #endif
3046 
3047 #ifndef HEATER_PINS_INVERTED
3048 #define HEATER_PINS_INVERTED 0
3049 #endif
3050 
3051 // Original pin assignmats to be used in configuration tool
3052 #define X_STEP_PIN ORIG_X_STEP_PIN
3053 #define X_DIR_PIN ORIG_X_DIR_PIN
3054 #define X_ENABLE_PIN ORIG_X_ENABLE_PIN
3055 #define X_MIN_PIN ORIG_X_MIN_PIN
3056 #define X_MAX_PIN ORIG_X_MAX_PIN
3057 
3058 #define Y_STEP_PIN ORIG_Y_STEP_PIN
3059 #define Y_DIR_PIN ORIG_Y_DIR_PIN
3060 #define Y_ENABLE_PIN ORIG_Y_ENABLE_PIN
3061 #define Y_MIN_PIN ORIG_Y_MIN_PIN
3062 #define Y_MAX_PIN ORIG_Y_MAX_PIN
3063 
3064 #define Z_STEP_PIN ORIG_Z_STEP_PIN
3065 #define Z_DIR_PIN ORIG_Z_DIR_PIN
3066 #define Z_ENABLE_PIN ORIG_Z_ENABLE_PIN
3067 #define Z_MIN_PIN ORIG_Z_MIN_PIN
3068 #define Z_MAX_PIN ORIG_Z_MAX_PIN
3069 
3070 #define E0_STEP_PIN ORIG_E0_STEP_PIN
3071 #define E0_DIR_PIN ORIG_E0_DIR_PIN
3072 #define E0_ENABLE_PIN ORIG_E0_ENABLE_PIN
3073 
3074 #define E1_STEP_PIN ORIG_E1_STEP_PIN
3075 #define E1_DIR_PIN ORIG_E1_DIR_PIN
3076 #define E1_ENABLE_PIN ORIG_E1_ENABLE_PIN
3077 
3078 #define E2_STEP_PIN ORIG_E2_STEP_PIN
3079 #define E2_DIR_PIN ORIG_E2_DIR_PIN
3080 #define E2_ENABLE_PIN ORIG_E2_ENABLE_PIN
3081 
3082 #define E3_STEP_PIN ORIG_E3_STEP_PIN
3083 #define E3_DIR_PIN ORIG_E3_DIR_PIN
3084 #define E3_ENABLE_PIN ORIG_E3_ENABLE_PIN
3085 
3086 #define E4_STEP_PIN ORIG_E4_STEP_PIN
3087 #define E4_DIR_PIN ORIG_E4_DIR_PIN
3088 #define E4_ENABLE_PIN ORIG_E4_ENABLE_PIN
3089 
3090 #define E5_STEP_PIN ORIG_E5_STEP_PIN
3091 #define E5_DIR_PIN ORIG_E5_DIR_PIN
3092 #define E5_ENABLE_PIN ORIG_E5_ENABLE_PIN
3093 
3094 #define E6_STEP_PIN ORIG_E6_STEP_PIN
3095 #define E6_DIR_PIN ORIG_E6_DIR_PIN
3096 #define E6_ENABLE_PIN ORIG_E6_ENABLE_PIN
3097 
3098 #define FAN_PIN ORIG_FAN_PIN
3099 #ifdef ORIG_FAN2_PIN
3100 #define FAN2_PIN ORIG_FAN2_PIN
3101 #endif
3102 
3103 #define PS_ON_PIN ORIG_PS_ON_PIN
3104 
3105 #ifndef ORIG_SDCARDDETECT
3106 #define ORIG_SDCARDDETECT -1
3107 #endif
3108 #define SDCARDDETECT ORIG_SDCARDDETECT
3109 
3110 #define SENSITIVE_PINS {0, 1, ORIG_X_STEP_PIN, ORIG_X_DIR_PIN, ORIG_X_ENABLE_PIN, ORIG_X_MIN_PIN, ORIG_X_MAX_PIN, \
3111  ORIG_Y_STEP_PIN, ORIG_Y_DIR_PIN, ORIG_Y_ENABLE_PIN, ORIG_Y_MIN_PIN, ORIG_Y_MAX_PIN, ORIG_Z_STEP_PIN,\
3112  ORIG_Z_DIR_PIN, ORIG_Z_ENABLE_PIN, ORIG_Z_MIN_PIN, ORIG_Z_MAX_PIN, LED_PIN, ORIG_PS_ON_PIN, \
3113  HEATER_0_PIN, HEATER_1_PIN, /*ORIG_FAN_PIN,*/ E0_PINS E1_PINS E2_PINS TEMP_0_PIN, TEMP_1_PIN,SDSS }
3114 #endif
3115